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

XF 1.5 Hide navigation item to certain usergroups

Zynektic

Well-known member
#1
This is probably the wrong way as it is not working but how do I fix below to hide 'support tickets' navigation to guest/registered?

Admin/Mod/Customer are groups 3, 4 and 5 and I put this code around the navigation item I added. I assume it does not work like that?

Code:
<xen:if is="!{xen:helper ismemberof, $visitor, 3, 4, 5}">
                <!-- mytab -->
        <li class="navTab PopupClosed"><a href="http://domain.com" class="navLink">Support Tickets</a></li>
                </xen:if>
Thanks
 

Brogan

XenForo moderator
Staff member
#2
That should work, assuming you don't want the link to be available to members of user groups 3, 4 and 5.
 

Zynektic

Well-known member
#3
I made a forum node, set it to private and allowed usergroups 3, 4 and 5.

I then added the link to the private node to remove it from the forum list to the navigation and wrapped conditional statements I use on my adsense code around it as above.

I just want it to show to 3, 4 and 5 and hide from usergroup 1 and 2.

I use a custom route if that makes any difference but cannot seem to get it to work.
 

Brogan

XenForo moderator
Staff member
#4
If you want it to show to user groups 3, 4 or 5, the syntax would be: <xen:if is="{xen:helper ismemberof, $visitor, 3, 4, 5}">