]> WPIA git - gigi.git/blob - doc/TemplateSyntax.txt
3b4a07ca1c0f1962b248be2e7fee91edde56bb5d
[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 sprintf-ed into the translated string.
11   
12 - <? if($variable) { ?>
13   Output/execute the text until "<? } ?>" only if $variable is boolean and true.
14