Variable usable across templates

Arty

Well-known member
I'm trying to set custom variable in a template that could be used later in another template. <xen:set> doesn't work, variable seems to be available only within template it was defined in.

Are there any solutions that don't require creating add-on?

Example: if I add this to node_forum_level_2 template
Code:
Old value = {$testVar}
<xen:set var="$testVar">test</xen:set>
New value = {$testVar}
old value is always empty, even though template is shown many times on same page.
 
Top Bottom