How to create Conditional statement

AKCDrew

New member
Hi,

I'm Trying to find out how to remove the staff nodes / widgets from view for certain groups, so in the image you can see iv highlighted in yellow staff area I want that to be visible to multiple groups but not to standard members /users or non registered users. I also want it to be displayed to the top left side in where i have circled in red.

Iv been told i need to create a conditional statement but il be honest I'm new to this and i dont have a clue what to do or where it goes if someone could help me with the and tell me where i need to put it in admin console that would be very appreciated
 
Last edited by a moderator:
To show a navigation tab to a single user group add this in the Display condition field: $xf.visitor.isMemberOf(x).
Change x to the group ID.

To show a navigation tab to multiple user groups add this in the Display condition field: $xf.visitor.isMemberOf([x, y]).
Change x and y to the group IDs. You can add more, comma separated.

To hide a navigation tab from a single user group add this in the Display condition field: !$xf.visitor.isMemberOf(x).
Change x to the group ID.

To hide a navigation tab from multiple user groups add this in the Display condition field: !$xf.visitor.isMemberOf([x, y]).
Change x and y to the group IDs. You can add more, comma separated.
 
Those are not navigation tabs.

You would need a completely different solution to add another link there.
It would require editing the PAGE_CONTAINER template and manually adding code.
 
Back
Top Bottom