Usergroup conditionals

What do you mean "view a certain user group"?

If you're talking about hiding/showing content to specific usergroups, you can do this:

Code:
<xen:if is="{xen:helper ismemberof, $visitor, 999}">
      Visitor is member of usergroup ID 999
</xen:if>
 
That's not quite what you asked for, but ok.

It will save you a lot of time and frustration if you just explain in advance what you're wanting to do in detail.

Using the Notable Members list as an example, the template has this:

Code:
                <xen:foreach loop="$staff" value="$user">
                    <li><xen:avatar user="$user" size="s" text="{$user.username}" class="Tooltip" title="{$user.username}" /></li>
                </xen:foreach>

So you could copy that several times and add a very similar conditional to what I used above for each usergroup you want to show:

Code:
               <div class="staffHeader">Moderating Staff</div>
                <xen:foreach loop="$staff" value="$user">
                   <xen:if is="{xen:helper ismemberof, $user, 4}">
                        <li><xen:avatar user="$user" size="s" text="{$user.username}" class="Tooltip" title="{$user.username}" /></li>
                   </xen:if>
                </xen:foreach>

So, something like that.
 
In the member_notable template, find this:

Code:
                <xen:foreach loop="$staff" value="$user">
                    <li><xen:avatar user="$user" size="s" text="{$user.username}" class="Tooltip" title="{$user.username}" /></li>
                </xen:foreach>

Modify as appropriate.
 
Top Bottom