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

XF 1.3 Secondary Group version of {$user.user_group_id}?

Discussion in 'Styling and Customization Questions' started by Staxed, Jun 16, 2014.

  1. Staxed

    Staxed Active Member

    I'm trying to work on a template edit that is currently using {$user.user_group_id}, but that only works for primary usergroups. I would like for this to work for secondary groups as well...but can't seem to find the right thing to do it.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Depending on what you are doing, you can use <xen:if is="{xen:helper ismemberof, $visitor, x}">

    Use <xen:if is="{xen:helper ismemberof, $visitor, x, y}"> for more than one user group.
     
  3. Staxed

    Staxed Active Member

  4. Valhalla

    Valhalla Well-Known Member

    It may work if you replace $visitor with $user, if you are referring to the profile, rather than who is visiting it.
     
    Staxed likes this.
  5. Staxed

    Staxed Active Member

    That worked, thanks. Was trying all sorts of things to replace $visitor with but never tried $user, are those options listed anywhere, I didn't see it mentioned in Brogans threads or in the documentation...I looked before I posted the question, did I miss it...or do you just have to "know"?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It is stated in the resource.

     
    Staxed likes this.

Share This Page