XF 2.2 Display Condition for forum's widget

FrancescoL

Active member
How to make sidebar and sidenav widgets appear in a specific forum? I know that I have to intervene in "display condition". But what should I enter? What is the code?
 
How to make sidebar and sidenav widgets appear in a specific forum? I know that I have to intervene in "display condition". But what should I enter? What is the code?

The user groups specified below (.isMemberOf([1,2,3,4,5]) should not (!)see the widget
!$xf.visitor.isMemberOf([1,2,3,4,5])

...
 
A bit old but not too old.

How can one exclude a specific widget I created myself, to a forum category and all forums belonging to that category.

For example category:
CARS
  • volvo
  • opel
  • mercedes

So the brands are the forums in the category.

Is that possible or do I need to exclude every forum specifically? And how to exclude multiple nodes?
 
Last edited:
You can use an array to include or exclude specific nodes.

This is for nodes you want the widget to display in: in_array($xf.reply.containerKey, ['node-1','node-2']) .

To exclude, use this: !in_array($xf.reply.containerKey, ['node-1','node-2']) .
 
Top Bottom