1. 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

Discussion in 'Styling and Customization Questions' started by Zynektic, Aug 28, 2015.

  1. Zynektic

    Zynektic Well-Known Member

    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?

    <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>
  2. Brogan

    Brogan XenForo Moderator Staff Member

    That should work, assuming you don't want the link to be available to members of user groups 3, 4 and 5.
  3. Zynektic

    Zynektic Well-Known Member

    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.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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}">
  5. Zynektic

    Zynektic Well-Known Member

    Ah that worked when I copied yours, I think I had an extra space. Thanks!

Share This Page