XF 2.1 Hide Public Navigation

xlegends

Member
Hi,

How can I hide public navigation navbar to unregistered/not logged i users.


Especially the custom made navigation.

I imitated the display conditions of some sub-navigations of forums/whatsnew that I did notice disappeared during log off

If I use

$xf.visitor.user_id

It does hide them to unregistered.

Is this the right display condition to achieve this?


What other display conditions can I use to allow unregistered to see tabs that registered can not or certain usergroups

Having trouble finding a mod to manage the permissions of the native navigation
 
You are doing it right. I do not see why there would be an issue with that
$xf.visitor.user_id < this should hide the tab from unregistered/visitors
 
oh ok, so XYZ is group ID #

So if my mods are group id 1 and admins are group id 2 and I want them to see a drop down navbar I set it

Code:
$xf.visitor.isMemberOf([1, 2])
 
Top Bottom