XF 2.1 Hide items in the navigation

drastic

Well-known member
What's the correct way to hide the forums and what's new items from the main navigation?

Our site is based on AMS and not really doing much with the empty forum (for now) so having it linked doesn't look good at the moment.

Thanks!
 

Attachments

  • hide.webp
    hide.webp
    9.8 KB · Views: 22
I've looked all over and still cannot find it, in the usergroup you can limit access, but it still shows forums on the navbar. I'm hoping to hide items from guests/unregistered users.
 
I've looked all over and still cannot find it, in the usergroup you can limit access, but it still shows forums on the navbar. I'm hoping to hide items from guests/unregistered users.

@craigles700 I don't know if you ever got your answer, but I got it to work by putting the following in the display condition field for the navigation option:

$xf.visitor.hasPermission('general', 'view')


Please let me know if I can (try) to be of any further help. This is a good thread also on the topic:


Stay well and safe!
 
To hide navigation items from guests/unregistered users, use the following display condition: $xf.visitor.user_id

Basically, if the user has a non-zero user_id they are not a guest and can see the item.
 
Top Bottom