Macro-table/fr
From GeneWeb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <title> GeneWeb macros </title> <html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- Insert the following line in the note of an individual : <a href="%sm=SRC;v=macros">Macros table</a> and place this whole page in file "bases/src/base/macros.txt" --> %%Xi;=%Xi;<br> %%Xk;=%Xk;<br> %%Xp;=%Xp;<br> %%Xo;=%Xo;<br> %%Xn;=%Xn;<br> %%Xm;=%Xm;<br> %%Xv;=%Xv;<br> <a href="%s"><img src="images/up.png" width="24" height="29"></a> <h2>GeneWeb Macros</h2> <p> The following table lists the macros available when personalizing GeneWeb pages. <br> The second columns provides the result of executing the macro in the current context. <table border="1" width="100%" height="60"> <tr><td> Macro </td><td> Example use</td><td> Result</td><td> What it does </td></tr> <tr><td> %a </td><td> %a</td><td> %a</td><td> Displays name of sosa reference (See %lz) </td></tr> <tr><td> %b </td><td> %b</td><td> %b</td><td> Value of "body_prop" (in base.gwf) </td></tr> <tr><td> %c </td><td> %c</td><td> %c</td><td> Number of queries for the welcome page </td></tr> <tr><td> %d </td><td> %d</td><td> %d</td><td> Date of first visit </td></tr> <tr><td> %D </td><td> %D</td><td> %D</td><td> Date of first visit </td></tr> <tr><td> %e </td><td> %e</td><td> %e</td><td> Character set </td></tr> <tr><td> %f </td><td> %f</td><td> %f</td><td> In server mode, base name followed by password. In CGI mode, name of the CGI command (ex: gwd.exe) </td></tr> <tr><td> %g </td><td> %g</td><td> %g</td><td> In server mode, same as "f". In CGI mode, name of the command, followed by "?b=basename;" </td></tr> <tr><td> %h </td><td> %h</td><td> %h</td><td> A list of <input type="hidden" name="var" value="val"/>\n for each hidden url variable </td></tr> <tr><td> %i </td><td> %i</td><td> %i</td><td> Highlight color</td></tr> <tr><td> %j </td><td> %j</td><td> %j</td><td> Include hed.txt file </td></tr> <tr><td> %k </td><td> %k</td><td> %k</td><td> Value of the action parameter of a http GET/PUT command </td></tr> <tr><td> %l </td><td> %l</td><td> %l</td><td> Language </td></tr> <tr><td> %L </td><td> %L</td><td> %L</td><td> Left (style: used in align="%%L")</td></tr> <tr><td> %m </td><td> %m</td><td> %m</td><td> Value of latest_event (in base.gwf) </td></tr> <tr><td> %n </td><td> %n</td><td> %n</td><td> Number of persons in the base </td></tr> <tr><td> %N </td><td> %N</td><td> %N</td><td> Content of <!-- .... --> as first line of base.gwb/notes file </td></tr> <tr><td> %o </td><td> %o</td><td> %o</td><td> Value of %%image_prefix; (see doc for image_prefix details (to be completed)) </td></tr> <tr><td> %p </td><td> %p</td><td> %p</td><td> noop </td></tr> <tr><td> %P </td><td> %P</td><td> %Pc</td><td> next (%%Pc) </td></tr> <tr><td> %q </td><td> %q</td><td> %q</td><td> Number of queries </td></tr> <tr><td> %r </td><td> %rfile </td><td> %rtest </td><td> Reads file bases/src/base/test.txt) (file must be followed by "end of line") </td></tr> <tr><td> %R </td><td> %R </td><td> %R </td><td> Right (style: used in align="%%R")</td></tr> <tr><td> %s </td><td> %s</td><td> %s</td><td> Value of %f followed by "?" and contextual variables (ex: "toto?lang=it;iz=8233;") </td></tr> <tr><td> %t </td><td> %t</td><td> %t</td><td> Base name </td></tr> <tr><td> %T </td><td> %T</td><td> %T</td><td> Value of %%doctype; (%%Vdoctype;=%Vdoctype;) (Given that doctype translates into <-- .... -->, nothing is visible in the result column. Look at the sources to verify) </td></tr> <tr><td> %u </td><td> %ufr;</td><td> %ufr;</td><td> returns "Français" if lang=fr, and "French" if lang=en (dont forget the ;)</td></tr> <tr><td> %U </td><td> %U</td><td> %U</td><td> User name </td></tr> <tr><td> %v </td><td> %v</td><td> %v</td><td> Returns GeneWeb version number </td></tr> <tr><td> %v </td><td> %vtext;</td><td> %v</td><td> Specific to m=NOTES context<br> returns the value of bvar.var_text </td></tr> <tr><td> %V </td><td> %Vvar;</td><td> %Vtest;</td><td> Value of bvar.var (in base.gwf) example %%Vtest; </td></tr> <tr><td> %w </td><td> %w</td><td> %w</td><td> Link to previous page (with back arrow icon)</td></tr> <tr><td> %x </td><td> %x</td><td> %x</td><td> noop </td></tr> <tr><td> %X </td><td> %Xvar;</td><td> %Xv;</td><td> Value of evar.var (in URL) example %%Xv; </td></tr> <tr><td> %y </td><td> %y</td><td> %y</td><td> noop </td></tr> <tr><td> %/ </td><td> %/</td><td> %/</td><td> if doctype = "html-4.01" then "" else "/" (used to terminate html tags as in <br%%/> -> <br%/> </td></tr> <tr><td> %% </td><td> %%</td><td> %%</td><td> % </td></tr> <tr><td></td></tr> <tr><td> <b>%I</b>a </td><td> <b>%I</b>aYes%E <b>%I</b><font color="blue">N</font>aNo%E </td><td> %IaYes%E %INaNo%E </td><td> auth_file exists. Global access restriction is on (see [[Access]])</td></tr> <tr><td> <b>%I</b>c </td><td> <b>%I</b>cYes%E <b>%I</b><font color="blue">N</font>cNo%E </td><td> %IcYes%E %INcNo%E </td><td> Cannot handle passwords </td></tr> <tr><td> <b>%I</b>f </td><td> <b>%I</b>fYes%E <b>%I</b><font color="blue">N</font>fNo%E </td><td> %IfYes%E %INfNo%E </td><td> We are "Friend" </td></tr> <tr><td> <b>%I</b>h </td><td> <b>%I</b>hYes%E <b>%I</b><font color="blue">N</font>hNo%E </td><td> %IhYes%E %INhNo%E </td><td> There is a history file </td></tr> <tr><td> <b>%I</b>j </td><td> <b>%I</b>jYes%E <b>%I</b><font color="blue">N</font>jNo%E </td><td> %IjYes%E %INjNo%E </td><td> Wizard_just_friend is active </td></tr> <tr><td> <b>%I</b>l </td><td> <b>%I</b>lYes%E <b>%I</b><font color="blue">N</font>lNo%E </td><td> %IlYes%E %INlNo%E </td><td> Browser handles tables </td></tr> <tr><td> <b>%I</b>m </td><td> <b>%I</b>mYes%E <b>%I</b><font color="blue">N</font>mNo%E </td><td> %ImYes%E %INmNo%E </td><td> notes_links <> [] </td></tr> <tr><td> <b>%I</b>n </td><td> <b>%I</b>nYes%E <b>%I</b><font color="blue">N</font>nNo%E </td><td> %InYes%E %INnNo%E </td><td> There is a base note file </td></tr> <tr><td> <b>%I</b>o </td><td> <b>%I</b>oYes%E <b>%I</b><font color="blue">N</font>oNo%E </td><td> %IoYes%E %INoNo%E </td><td> Notes dir exists </td></tr> <tr><td> <b>%I</b>p </td><td> <b>%I</b>ptest;Yes%E <b>%I</b><font color="blue">N</font>ptest;No%E </td><td> %Iptest;Yes%E %INptest;No%E </td><td> Base env variable <> "" (var terminated by ;)</td></tr> <tr><td> <b>%I</b>s </td><td> <b>%I</b>sYes%E <b>%I</b><font color="blue">N</font>sNo%E </td><td> %Istest;Yes%E %INstest;No%E </td><td> Base env variable <> "no" </td></tr> <tr><td> <b>%I</b>w </td><td> <b>%I</b>wYes%E <b>%I</b><font color="blue">N</font>wNo%E </td><td> %IwYes%E %INwNo%E </td><td> We are "Wizard" </td></tr> <tr><td> <b>%I</b>z </td><td> <b>%I</b>zYes%E <b>%I</b><font color="blue">N</font>zNo%E </td><td> %IzYes%E %INzNo%E </td><td> Sosa ref exists </td></tr> <tr><td> </td><td> </td><td colspan=2> Expressions are limited to the following macros : a c f j l m n o p s w z which return True or False </td></tr> <tr><td> <b>%I</b>t </td><td> <b>%I</b>tYes%E <b>%I</b><font color="blue">N</font>tNo%E </td><td> %ItYes%E %INtNo%E </td><td> Bad macro (twice) (prints !!!!x!!!!, returns True) </td></tr> <tr><td> <b>%I</b><font color="blue">N</font> </td><td> <b>%I</b><font color="blue">N</font>[<em>expression</em>] </td><td> </td><td> Inverts the result of [<em>expression</em>] (See <b><b>%I</b>f</b> thru <b><b>%I</b>z</b> for usage examples)</td></tr> <tr><td> <b>%I</b>| </td><td> <b>%I</b>|fwf and w%<b>E</b> </td><td> %I|wff or w%E </td> <td> Logical "or" with two following expressions </td></tr> <tr><td> <b>%I</b>& </td><td> <b>%I</b>&whw and history file%<b>E</b> </td><td> %IN&wfw and history file%E </td> <td> Logical "and" with two following expressions </td></tr> </table> <br> %w Previous page </body> </html>