Conditional Statements for XenForo 2

Conditional Statements for XenForo 2

Anyone know how to hide a widget if someone is viewing XFMG (Xenforo media gallery)? I don;t want the widget to show when in the gallery, just the forums.
 
Anyone know how to hide a widget if someone is viewing XFMG (Xenforo media gallery)? I don;t want the widget to show when in the gallery, just the forums.
Unless I misunderstand you'd just uncheck the widget to be in the widget control.

What widget are you trying to hide?
 

Attachments

  • Screen Shot 2024-02-01 at 4.53.33 PM.webp
    Screen Shot 2024-02-01 at 4.53.33 PM.webp
    25.3 KB · Views: 0
You can exclude certain templates by adding them to this code:

!in_array($xf.reply.template, ['xfmg_media_index','templat_X'])

Or you can exclude the whole XFMG section with this coce:

$xf.reply.section != 'xfmg'

(y)
 
Top Bottom