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

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.
 
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.
 
It may work if you replace $visitor with $user, if you are referring to the profile, rather than who is visiting it.

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"?
 
It is stated in the resource.

Depending on the template being worked with, you may need to use $user instead of $visitor; $visitor is always the record for the current logged in user, $user is the record being processed (e.g. message author, member list, list of online users, etc.).
 
Top Bottom