Template Engine language reference > Variables

Variables
Variables are used to include dynamic content in order to personalize a document or produce transactional content. Variables are in this context not the same as StreamServe script variables, although it is possible to reference script variable values (see Script variable interface).
A variable is local to the scope of a template, including external templates referenced using the #parse directive (see The #parse directive).
To use a variable it must first be initialized and assigned a value. The variable value is set by a #set directive in the template.
##My first template
#set( $name = 'World')
Hello $name
Hello World
You can use different reference notations for variables:
Formal notation: ${identifier}
Quiet notation: $!identifier
In most cases you will use the shorthand notation, but in some cases you may need formal reference notation or quiet reference notation (or a combination of the two) for correct processing. See Formal reference notation and Quiet reference notation.
The shorthand notation of a variable consists of a leading $ character followed by an alphabetic character (a..z, A..Z) or underscore (_). The rest of the characters are limited to the following types of characters:
Alphabetic (a..z, A..Z)
Example 3
$foo
$myVar
$my_var
$myvar1
 
Note:
Do not use $message or $variables as variables. These variables are reserved and used to reference message data and script variables. See Message interface and Script variable interface.
Variables are case sensitive
Variables are case sensitive, which means $var and $VAR are references to two unique variables.
Variable types
Variables are typed, and the following types are available:
OpenText StreamServe 5.6 Updated: 2013-03-01