2.2 Scripting Keywords and Constructs

Templates use braces ({}) to identify keywords and constructs embedded in the document. For example, {VAR User.name} identifies the keyword VAR followed by the name of a variable which the VAR keyword requires.

If an open brace is not followed by a keyword, it is not considered a part of a keyword and is treated as any other character in the document. White space such as spaces, tabs, carriage returns and line feeds can occur anywhere between the braces, keywords and parameters. The only exception is the comment keyword (!) which requires the comment character to immediately follow the opening brace: {! This is a comment. }.

Keywords are case sensitive. Keywords can be nested with other keywords. However, if the nested keyword is inside a quoted string, the nested keyword will not be evaluated but will be considered a part of the string.

The following sample:

{SET test = "TEST"}
{SET a = "This is a "{VAR test}}
{VAR a}

Produces this output:

This is a TEST

The following sample:

{SET test = "TEST"}
{SET a = "This is a {VAR test}"}
{VAR a}

Produces this output:

This is a {VAR TEST}