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:
4 - $variablename: a variablename matches the regex [a-zA-Z0-9_-]
6 - <?=$variablename?> will output "variablename".
7 if "variablename" is an Outputable output this thing recursively.
8 else turn it into a String (Object.toString()) and output it.
10 - <?=$!variablename?> will output the variable "variablename" but not HTML-escaped
12 - <?=_This is free Text.?> will translate "This is free Text." into the users language, (escaped) and output it.
13 Text may not contain "?>".
14 If the text contains "$" or "!'" it is interpreted as "advanced replacement".
15 - ${variablename} is interpreted as "output this variable at this point"
16 - !'literal content' output "literal content" here and do not translate or escape. (literal content may not contain any of: {}'$ )
17 Then the whole text than also may not contain "{" and "}".
19 - <? if($variable) { ?> ... <? } ?>
20 Output/execute the text until "<? } ?>" only if $variable is Boolean.TRUE (<=> !Boolean.FALSE) or not null.
21 - <? if(...) { ?> ... <? } else { ?> ... <? } ?>
23 - <? foreach($variable) { ?> ... <? } ?>
24 If $variable is an "IterableDataset"
25 Output/execute the text until "<? } ?>" repeated as $variable suggests.
26 Special variables that $variable defines can be used in the inner text.