A template is constructed from a charstream. Everything that is not in "" will be outputted directly. Text in these markers will be interpreted is template scripting syntax. The following strings are valid: General remarks: - $variablename: a variablename matches the regex [a-zA-Z0-9_-] Syntax: - will output "variablename". if "variablename" is an Outputable output this thing recursively. else turn it into a String (Object.toString()) and output it. - will output the variable "variablename" but not HTML-escaped - will translate "This is free Text." into the users language, (escaped) and output it. Text may not contain "?>". If the text contains "$" or "!'" it is interpreted as "advanced replacement". - ${variablename} is interpreted as "output this variable at this point" - $!{variablename} is interpreted as "output this variable unescaped at this point" - !(/link) is interpreted as "output an opening -tag to '/link' at this point" (which must be closed, e.g. using !'', see below) - !'literal content' output "literal content" here and do not translate or escape. (literal content may not contain any of: {}'$ ) Then the whole text than also may not contain "{" and "}". - ... Output/execute the text until "" only if $variable is Boolean.TRUE (<=> !Boolean.FALSE) or not null. - ... ... - ... If $variable is an "IterableDataset" Output/execute the text until "" repeated as $variable suggests. Special variables that $variable defines can be used in the inner text. Adding a "\" before a newline will cause both the backslash and the newline get removed. This allows non-visible line-breaks in templates. Note: Mail templates consist of a template for subject and a template for the body. Prolonging the subject-line with this feature is not possible.