Difference between revisions of "templates"
m (spelling" invoked) |
(→Modules) |
||
Line 47: | Line 47: | ||
</pre> | </pre> | ||
− | == Modules == | + | == Personnalisation Modules == |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
The {{c|.gwf}} file holds another set of variable definitions using letters rather that digits: | The {{c|.gwf}} file holds another set of variable definitions using letters rather that digits: | ||
Line 126: | Line 64: | ||
perso_module_l=ligne | perso_module_l=ligne | ||
</pre> | </pre> | ||
− | [[File: | + | [[File:p_mod-configuration.png|thumb|400px|right|Pull-down menu for module and option selection.]] |
Each module can be displayed with a choice of options. | Each module can be displayed with a choice of options. |
Revision as of 21:50, 11 October 2017
![]() |
English • français |
---|
The gwd server produces the HTML code displayed by the client browser according to instructions stored into text files. Examples of such files are:
- welcome.txt the welcome page shown when you connect to
localhost:2317/basename
. - perso.txt the page that displays one individual of the base.
- updfam.txt the page containing the form to update a family.
A template is a set of such files organized into a coherent user interface. Template files are stored in folders named distribution/gw/etc/template_name
and bases/etc/basename/template_name
. Note that when searching for a template file, GeneWeb will search in the following order:
-
bases/etc/basename/file
-
bases/etc/template_name/file
-
distribution/gw/etc/template_name/file
-
distribution/gw/etc/file
?
If no file is found, then the search continues with the list of templates defined by the configuration variable template
found in base.gwf
.
As a result, you may limit your editing to the file whose content you want to change. All the other files will be found in the default folder according to the sequence above.
Templates are invoked by adding (through a clickable button if available, or manually if not) templ=templ_name;
in the URL at the top of your browser. GeneWeb will "remember" this request for a template use and will automatically add the appropriate text in all subsequent URL requests.
See the experts section for further discussion on template programming.
Perso.txt
The file perso.txt offers an additional customization level by providing several options for the display of personnal data. The code below is somewhat self explanatory:
%import;perso_utils %include.perso_header; %if;(bvar.perso_module_tplnb="" or bvar.perso_module_tplnb=0) %apply;show_templ("perso_module/etat_civil") %apply;show_templ("perso_module/parent_simple") %apply;show_templ("perso_module/union_simple") %apply;show_templ("perso_module/freresoeur_simple") %apply;show_templ("perso_module/relations") %apply;show_templ("perso_module/timeline") %apply;show_templ("perso_module/notes") %apply;show_templ("perso_module/sources") %apply;show_templ("perso_module/arbre_3gen_v_photo") %else; %for;i;0;bvar.perso_module_tplnb; %apply;get_templ(i) %end; %end;
Personnalisation Modules
The .gwf
file holds another set of variable definitions using letters rather that digits:
perso_module_i=individual perso_module_p=parents perso_module_u=unions perso_module_f=fratrie perso_module_r=relations perso_module_c=chronologie perso_module_n=notes perso_module_s=sources perso_module_a=arbres perso_module_g=gr_parents perso_module_d=data_3col perso_module_l=ligne
Each module can be displayed with a choice of options.
The display of modules on a personnal pages will be governed by a vector defining a selection amongst the modules above, the order in which they are displayed and the chosen option.
The vector appears as a string of letters and digits.
Each pair "letter, digit" identifies the selected module,
and the value of its display options
The modules are displayed in the order in which they appear in the p_mod
parameter as
in the example below, "gd_parents", "individual", "parents", "unions", ...
p_mod=g1i1p1u1r1c1f1s1
Selecting p_mod=p1p2p3p4p5
will display all five options for the module [[c|parents}}.
The menubar of the perso.txt
page provides an interface to change the value of this p_mod
parameter and to select options. As the mouse hovers on the option button, a pop-up showing the general aspect of the chosen option will appear. On the rignt of the selection window, thise pop-ups will accumulate representing the resulting page..
You may choose any set of (single) letters (a-z) to designate modules.
Examples
The result corresponding to each choice is as follows:
(These examples ware taken from a version 6 instance. Version 7 of GeneWeb may provide somewhat different results).
File name | Example |
---|---|
etat_civil | |
parent_simple | |
parent_evolue | |
parent_complet | |
parent_photo | |
union_simple | |
union_evolue | |
union_complet | |
union_photo | |
freresoeur_simple | |
freresoeur_complet | |
famille | |
relations | |
notes | |
sources | |
timeline | File:Timeline.jpg Timeline. |
arbre_3gen_v | |
arbre_nav3_photo | |
arbre_4gen_v | |
arbre_5gen_h |
GeneWeb Manual
- Download and install GeneWeb program under GNU/Linux, Mac OS X, Microsoft Windows, FreeBSD; on Mac OS X, Linux or Windows using Docker; or in CGI mode behind a web server.
- Understand GeneWeb server, homonym, consanguinity.
Use and manage genealogical databases
- Import Gedcom
.ged
or GeneWeb.gw
files with gwsetup or in command-line. - Update datas (add/remove individuals and families), merge duplicates, type dates.
- Use wikitext syntax, macros, keyboard shortcuts.
- Clean, recover, rename, save, archive a database.
- Merge and split multiples databases.
Technical annex
- Personalize CSS, header and trailer, templates, lexicon and declension.
- Configuration file
.gwf
(for templm), wizard notes, passwords for friends/wizards and access restrictions to databases. - Add images in notes, further remarks for experts.