• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved Condition to display widget in certain article category

CHAIM2003

New Member
AMS
Hello :)
I'd like to display a widget in a certain article category.
What should the condition look like?

Thanks!!
 
For displaying in a single category...

Note
: change 1 to the specific category ID that you want the widget to be displayed in
Code:
$xf.reply.containerKey == 'amsCategory-1'


For displaying in multiple category's...
Code:
in_array($xf.reply.containerKey, ['amsCategory-1', 'amsCategory-2', 'amsCategory-4'])


Example... here I am telling the widget to only display on AMS Category 1 (News).

Selection_075.png


And here you can see it displaying in the News Category Sidenav

Selection_076.png
 
Back
Top