.link : the browsing tree

The browsing tree describe the way you want people to understand the hierarchy of your web site. For each page, you may define a Parent one and a Following or a Previous Page. To have a graphical idea of this browsing tree, consult the presentation here.

In a .link file, you describe the relative organization of your files within a directory. Then ManyPage read it and provide values for 'BACK', 'UP' and 'NEXT' type objects. You will be able to use those values to build button in a browsing menu to allow websurfers to move from one page to the following or to its parent...

Remember that a .link file applies only to the files of the directory to which it belongs. We will see that we may place information about file that are not in that directory, but just to precise a relationship. There is no side effect.

In a .link file, the tree (as shown in the browsing chapter) is laid down on the left, the parent file is on the left and the descendant on the right. The brotherhood relationship is vertical (first pages on the top). The delimiter between each level of the hierarchy is the sequence tabulation + colon

here is a excerpt that describe a part of browsing chapter model, with the assumption that all the file are in the same directory :

subject2.+
	: page1.+
	: page2.+
	: page3.+
	: page4.+

Name of files : the .+ => .en.html or .fr.html or ...

As in object definition, you may choose to not write the suffix of the filename. Depending on the file it is dealing with, ManyPage will know which suffix to had.

Browsing tree / directory tree

You may have parent or child files which are not in the same directory. You should name them with classical unix relative pathname scheme ("../" to go up a directory and "directoryName/" to go down the "directoryName" directory). Remember that as .link files has no side effect, the links in those file won't be modify. You have to introduce or modify the .link file in those directories.

Imagine you have an "index" file at the root of your web site (in fact two index : index.en.html and index.fr.html...), and a directory "Chapter2". In "Chapter2", you find "page1", "page5" and "page51" files and "Sub1" and "Sub2" subdirectories. In "Sub1" you have "page2", "page3" and "page4", and in "Sub2" you have only "page52".

You have guessed that pages 1, 2, 3, 4, 5 will be brothers with "index" as the parent and that 51 and 52 have 5 as a parent. Of course, this is not the best way to organize your files, but it help explaining :-)

Here is how you may represent the directory tree :

/
/index.fr.html
/index.en.....
/Chapter2/
/Chapter2/page1...
/Chapter2/page5
/Chapter2/page51
/Chapter2/Sub1/
/Chapter2/Sub1/page2
/Chapter2/Sub1/page3
/Chapter2/Sub1/page4
/Chapter2/Sub2/
/Chapter2/Sub2/page52

And here is 3 .link files that could represent the browsing tree

Chapter2 .link :

../index.+
	: page1.+
	: Sub1/page2
	: Sub1/page3
	: Sub1/page4
	: page5.+
	:	: page51.+
	: 	: Sub2/page52.+

another better version would be the following, even if both are valid :
page1.+		<UP>../index.+</UP>
Sub1/page2
Sub1/page3
Sub1/page4
page5.+
	: page51.+
	: Sub2/page52.+

Sub1 .link :

../page1.+		<UP>../../index.+</UP>
page2.+	
page3.+
page4.+
../page5.+

Sub2 .link :

../page51.+		<UP>../page5.+</UP>
page52.+

You will notice from this example that all the filenames are always relative to the directory in which the .link file is.
Some new tags (as UP) may appear in these .link files...

<UP>

<UP> defines what is the parent for all the following brothers. It is why it appears only for the first child. In ManyPage, one child has only one parent. This is why all brother files should have the same one (quite more simple than in human model, isn't it ? :-). In fact, if you well understand the concept, you have perhaps discovered that you may cheat with different .link description in different directories, but it wouldn't be a good idea to do so if you don't want to confuse websurfers.

<SEP>

If we go on with the "If you well understand the concept", you will notice that the following line is not necessary in the Chapter2 .link :

Sub1/page3

In fact, if you forget to write the Sub1 .link, ManyPage will know nothing about page3 place in the hierarchy, because, as stated before .link file as an effect only on the file in the same directory. The line is just there to avoid to write wrong things like page2 is the Previous file of page4... If you want to avoid such a thing you may want to use the <SEP> tag. This tag aim is to define different groups of brother in the same directory, sometime with different parents...

Then the Chapter2 .link file could be written (it could be useful when there are more than only one page3 concerned) :

page1.+		<UP>../index.+</UP>
Sub1/page2
<SEP>
Sub1/page4	<UP>../index.+</UP>
page5.+
	: page51.+
	: Sub2/page52.+

<TWIN>

You may have designed all your site with 'index.fr.html' as your default home page then you discover that your ISP default home page is 'home.html' or you don't want to bother making default home page for some sub sub subdirectories... Then you can use the TWIN tag which copy the pointed file to another location and modify all the link within it if the location is not in the same directory in order to keep good links.

For the following example, I supposed that all the precedent pages (from 1 to 51) are in the root directory and I had a 'default' page which will be copied in the Sub1 and Sub2 directories (they are both at the root level too). Moreover, index.fr.html will be copied to home.html (NB : if you think it should be index.en.html, then you should inverse the order declaration within the PM.LANGAGE tag).

index.+		<TWIN>home.html</TWIN>
	page1.+
	page2.+
	page3.+
	page4.+
	page5.+
	:	page51.+
	:	page52.+
	<SEP>
	default.+	<UP>index.+</UP>	<TWIN>Sub1/home.html</TWIN>	<TWIN>Sub2/home.html</TWIN>

Copyright 1994-2009
Pascal Vuylsteker

Last modified:
25/3/2002

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