GeneWeb

GeneWeb - Customization of pages



This part indicates how to customize the welcome pages and the other pages and to put associated pages. It is written for people having handled GeneWeb already and who want to go into the details.

Welcome page

The welcome page is built from text files, the files "start.txt" provided with the distribution of GeneWeb. It is possible to modify these files and/or make a specific version for a given database.

These files contain HTML mixed with "macros" (see following section). If you want to create such files or modify them, do not use an HTML editor, but a normal text editor.

To build the welcome page of the base "foo", GeneWeb will look for the following files, in this order:

where:

The files "hdir/lang/lg/start.txt" are provided with the distribution. To make the custom file, the simplest way is to start from a copy of a file "start.txt" which you will arrange as you want. If the presentation of the files "start.txt" do not suit you, you can also change them directly.

Warning however: from a version of GeneWeb to the other, the files "start.txt" may have been improved. If you take a new version and want to benefit from the improvements, look at the files "start.txt" to see where they have been modified and include their modifications in your customized files.


Macros

As indicated previously, the files of welcome pages are not pure HTML. They hold "macros". They are sequences beginning with the character "%" and followed by a letter. Examples: "%s", "%x", etc.

These macros is replaced by values which depend on the context: name of the base, language, number of persons in the base, etc.

There is also a particular processing for the brackets "[" and "]": if the text between hooks is translated in the current language from the lexicon (file "lexicon.txt") with the following modifications:

To understand how the macros are used, the best is to look at the files "start.txt" provided in the distribution.

Here the meanings of the macros "%":

Some macros refer to contextual variables. They are:


Associated pages

In your customized welcome page, you can put links to associated files which will be treated by GeneWeb in the same way: the macros will be transformed.

For example, if you want to put a special page of the famous persons of your base, make a file named "famous.txt" in the directory "bdir/lang/lg" or in the directory "bdir/lang" (see first section).

The request of access to "famous.txt" is: "m=H;v=famous". In the welcome page, you will thus put:

   <a href="%sm=H;v=famous">Famous</a> persons of my
   database.

In "famous.txt", you can put links to persons of your base, independently from his name and from the context, using the appropriate macros.

The particularly interesting macros are:

Example of sentence in "famous.txt":
   See my cousin <a href="%sp=louis;n=de+bourbon;oc=5">
   Louis XIV</a> and my
   <a href="%sem=R;ep=john;en=smith;m=NG;n=louis+xiv;t=PN">
   relationship links</a> with him.

See how to make correct links to GeneWeb pages as well.

Notice that the "advanced request" works like an associated file named "advanced.txt".


All the pages

The pages, the welcome page included, can be customized in three places:



Return to Directions for Use


© Copyright 2001 INRIA - GeneWeb