]> WPIA git - gigi.git/blob - doc/TemplateSyntax.txt
ADD: User groups table
[gigi.git] / doc / TemplateSyntax.txt
1 A template is constructed from a charstream. Everything that is not in "<?" to "?>" will be outputted directly. Text in these markers will be interpreted is template scripting syntax. The following strings are valid:
2
3 - <?=$variblename?> will output "variablename".
4    if "variablename" is an Outputable output this thing recursively.
5    else turn it into a String (Object.toString()) and output it.
6    
7 - <?=_This is free Text.?> will translate "This is free Text." into the users language, (escaped) and output it.
8    
9 - <?=s,$var1,$var2,$var3,...,$varn,This %s is, %s free.?>
10   Translate the last string. Output $var1,...,$varn replaced into the %s positions in the translated string.
11
12 - <?=$!variablename?> will output the variable "variablename" but not HTML-escaped
13 - <?=s,$!variablename,My %s text?> will insert the variable "variablename" into the translated text but not HTML-escaped
14   
15 - <? if($variable) { ?>
16   Output/execute the text until "<? } ?>" only if $variable not null or Boolean.FALSE.
17   
18 - <? foreach($variable) { ?>
19   If $variable is an "IterableDataset"
20   Output/execute the text until "<? } ?>" repeated as $variable suggests. 
21   Special variables that $variable defines can be used in the inner text.
22  
23   
24