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

Discussion in 'AMS Support' started by CHAIM2003, Sep 19, 2021.

  1. CHAIM2003

    CHAIM2003 New Member AMS

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

  2. Bob

    Bob Developer Staff Member

    For displaying in a single category...

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

    For displaying in multiple category's...
    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).


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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.