Skip to content
miroshnikov edited this page Mar 27, 2015 · 1 revision

{assign}

{assign} is used for assigning template variables during the execution of a template.

Attribute Required Description
var Yes The name of the variable being assigned
value Yes The value being assigned
{assign var="name" value="Bob"} {* or *} {assign "name" "Bob"} 

The value of name is {$name}.

{assign "foo" "foo is [{'bar'|upper}]"} 
{$foo}

Output:

The value of name is Bob. 
foo is [BAR]

Clone this wiki locally