1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Variable usable across templates

Discussion in 'Styling and Customization Questions' started by Arty, Jun 29, 2012.

  1. Arty

    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
    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.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page