XF 2.1 Widget Display Condition

Graham Smith

Active member
I only want one of our widgets to be viewable if someone is a member of usergroup 13, so in the widget display condition box, I've put

if is="$xf.visitor.isMemberOf(13)

However, it's still viewable by everyone.

What am I missing?


Active member
* bump *

How should the display condition be set if you want to exclude a single user group? I'd like to display a widget to logged in members, but not guests.


New member
Hi @Brogan - do we have docs where we can see the available conditions?
Or this is pure XF code?
Where can we see this code then? Like what objects are available under the $context ?

This condition $xf.visitor.user_id
means that if the visitor has an user_id it means he is logged I guess.


XenForo moderator
Staff member