The template expression language is a small subset of JavaScript, and uses JavaScript syntax and precedence rules. Use JavaScript operators to write an expression like this:
@@(firstName+lastName)@@
The following features and operators are supported:
numeric literals, string literals (double-quote syntax only), Boolean literals (true or false)
variable reference (see the list of defined variables later in this section)
field reference (the “dot” operator)
unary operators: +, -, ~, !
binary operators: +, -, *, /, %, &, |, ^, &&, ||, <, <=, >, >=, ==, !=, <<, >>
conditional operator: ?:
parentheses: ()
The following data types are used: Boolean, IEEE 64‑bpc floating point, string, and object. Dreamweaver templates do not support the use of JavaScript “null” or “undefined” types. Nor do they allow scalar types to be implicitly converted into an object; thus, the expression "abc".length would trigger an error, instead of yielding the value 3.
The only objects available are those defined by the expression object model. The following variables are defined:
During expression evaluation, all fields of the _document object and _repeat object are implicitly available. For example, you can enter title instead of _document.title to access the document’s title parameter.
In cases where there is a field conflict, fields of the _repeat object take precedence over fields of the _document object. Therefore, you shouldn’t need to explicitly reference _document or _repeat except that _document might be needed inside a repeating region to reference document parameters that are hidden by repeated region parameters.
When nested repeated regions are used, only fields of the innermost repeated regions are available implicitly. Outer regions must be explicitly referenced using _parent.