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

adding to a var in a template

Discussion in 'XenForo Development Discussions' started by Mutt, Feb 28, 2012.

  1. Mutt

    Mutt Well-Known Member

    is there a version of set var
    <xen:set var="$myVar">1234</xen:set>
    <xen:set var.="$myVar">1234</xen:set>
    that lets me keep adding to the var? I want to use it inside a loop to avoid repeating the loop later in the page.

    if not would this work?
    <xen:set var="$myVar">{xen:raw $myVar} 1234</xen:set>

    if it makes a diff, in sidebar_online_staff there is a foreach loop that looks for mods & admins. I'd like for it to right under that have it also look for our VIP usergroup & then below the staff list have a vip list. I know I could do a 2nd for each to do that but is seemed like a waste when I could just collect them up in this one.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That doesn't work in my testing. I don't see any option for what you want.

Share This Page