Example

When you untar the ManyPage package, you get a first example in the Src directory of the package. Another example is available online : it is the Source directory of this web site. Some files are not up to date (this is a copy done during this site construction) and the index (default) files have been removed in order to let you move within the directories, but the most interesting files to look at are of course, the .obj, .dress and .link files. You should especially have a look at the root .dress, .obj and .link files and at ManyPage directory .obj and .link files.

You may want, for instance, to compare this final page with its source.

In this part well go a step further by extracting some interesting part from some of those files.

A simple object : MP.WARNING

In the following example, the English and French BUILDING objects have the same structure. The only difference is the text. Moreover, this text should be easily modified. That's why these texts are defined as sub-objects used in the main one. As explain in the multilingualism of ManyPage, only the object matching the language suffix of the page will remain in the final object.

<MP.BUILDING.FR>
   Ce site est vraiment en pleine construction. 
   Repassez d'ici la fin F&eacute;vrier pour une version plus avanc&eacute;e.<P>
   La partie ManyPage est d&eacute;j&agrave; exploiatble.
   </MP.BUILDING.FR>
   
<MP.BUILDING.EN>
   This web site is being build. Come later (for instance the end of February)    
   to see it there is a real improvement.<P>
   The ManyPage part is already almost finished.
   </MP.BUILDING.EN>
   
<MP.BUILDING>
   <CENTER> 
   <table width="80%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">
   <tr>
   <td>
   <table width="100%" border="0" height="100%" bgcolor="#FFFFFF" cellpadding="5">
   <tr> 
   <td height="17" width="27%">
   <h3>Attention </h3>
   </td>
   <td ><MP.BUILDING.FR>
   <MP.BUILDING.EN>
   </td>
   </tr>
   </table>
   </td>
   </tr>
   </table>
   </CENTER>
   </MP.BUILDING>

 

A menu item selection

This is a extract of a menu definition, with a lot of button. At the root level, the button is not highlighted and <MP.MENU1.D.SELECTED> is <MP.MENU1.COLOR.NOT.SELECTED>, i.e. the value of the background

In some subparts (subdirectories) of the web site, there are some .obj files which contain only the following definition :

<MP.MENU1.D.SELECTED>
	<MP.MENU1.COLOR.SELECTED> 
	</MP.MENU1.D.SELECTED>

That will be enough to have the matching button appear with a darker colour

<MP.MENU1.COLOR.NOT.SELECTED>
	#66FFFF
	</MP.MENU1.COLOR.NOT.SELECTED>
   
<MP.MENU1.COLOR.SELECTED>
	#009999
	</MP.MENU1.COLOR.SELECTED>
	<MP.MENU1.D.SELECTED>
	<MP.MENU1.COLOR.NOT.SELECTED> 
	</MP.MENU1.D.SELECTED>
   
<MP.MENU1.D>
	<MP.MENU1.SEP.LEFT>
	<a href="http://www.mediaport.net/VR" 
	onMouseOver="window.status='<MP.MENU1.D.ONMOUSETEXT>'; 
	return true"><MP.MENU1.LEFT.FONT><MP.MENU1.D.TEXT><MP.MENU1.RIGHT.FONT></A>
	<MP.MENU1.SEP.RIGHT> 
	</MP.MENU1.D>

<MP.MENU1>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" 
	bgcolor="<MP.MENU1.COLOR.NOT.SELECTED>">
	<th bgcolor="<MP.MENU1.A.SELECTED>"><MP.MENU1.A></th>
	<th bgcolor="<MP.MENU1.B.SELECTED>"><MP.MENU1.B></th>
	<th bgcolor="<MP.MENU1.C.SELECTED>"><MP.MENU1.C></th>
	<th bgcolor="<MP.MENU1.D.SELECTED>"><MP.MENU1.D></th>
	</table>
	</MP.MENU1>

Example of one browsing button : the BACK button

Value inside this page : <MP.MENU.LINK.BACK> :

<MP.MENU.LINK.FRBACKTXT>
	<PM.IF EXIST=`<PM.KEYWD.TITLEBACK>` THEN=`P. Prec. : <PM.KEYWD.TITLEBACK>`
	ELSE=`Page Prec&eacute;dente`>
	</MP.MENU.LINK.FRBACKTXT>

<MP.MENU.LINK.ENBACKTXT>
	<PM.IF EXIST=`<PM.KEYWD.TITLEBACK>` THEN=`Previous page : <PM.KEYWD.TITLEBACK>`
	ELSE=`Previous page`>
	</MP.MENU.LINK.ENBACKTXT>
   
<MP.MENU.LINK.FRBACKSHORTTXT>
	P. Prec&eacute;dente
	</MP.MENU.LINK.FRBACKSHORTTXT>

<MP.MENU.LINK.ENBACKSHORTTXT>
	Previous
	</MP.MENU.LINK.ENBACKSHORTTXT>
   
<MP.MENU.LINK.BACK.FR>
	<MP.MENU3.SEP.LEFT>
	<A HREF="<PM.KEYWD.BACK>"
	onMouseOver="window.status='<MP.MENU.LINK.FRBACKTXT>';
	return true"><MP.MENU3.LEFT.FONT><MP.MENU.LINK.FRBACKSHORTTXT>
	<MP.MENU3.RIGHT.FONT></A>    
	<MP.MENU3.SEP.RIGHT>
	</MP.MENU.LINK.BACK.FR>

<MP.MENU.LINK.BACK.EN>
	<MP.MENU3.SEP.LEFT>
	<A HREF="<PM.KEYWD.BACK>" 
	onMouseOver="window.status='<MP.MENU.LINK.ENBACKTXT>'; 
	return true"><MP.MENU3.LEFT.FONT><MP.MENU.LINK.ENBACKSHORTTXT>
	<MP.MENU3.RIGHT.FONT></A>    
	<MP.MENU3.SEP.RIGHT>
	</MP.MENU.LINK.BACK.EN>

<MP.MENU.LINK.BACK>
	<MP.MENU.LINK.BACK.FR><MP.MENU.LINK.BACK.EN>
	</MP.MENU.LINK.BACK>

One little interesting detail is the test of the existence of a title in the previous page, and the use of a default value if not.

The most important about the <MP.MENU.LINK.BACK> is its use : you have to test the existence of a Previous page (which is defined by the .link file) by using the <PM.KEYWD.BACK> generated (or not) by ManyPage at run time.

<PM.IF EXIST=`<PM.KEYWD.BACK>` THEN=`<th><MP.MENU.LINK.BACK></th>`>

Copyright 1994-2009
Pascal Vuylsteker

Last modified:
22/2/2001

Send your comments at :
<pvk@vuylsteker.net>