XF 2.1 Widget display conditional

Russ

Well-known member
Using the display conditional how would you use it to target a specific template?

I've tried...

$template == 'thread_view'
$template == thread_view
$__globals.template == 'thread_view'
$__globals.template == thread_view

Which clearly don't work or else I wouldn't be asking :D

I have a specific setup for a client where we're using "public sidebar: top" for all of the widgets. We want to stick a widget in the middle of those only for thread view, I figured a display conditional could help here. I'm aware public sidebar mentions it shows on all pages above anything else, but just curious for a work-around.
 
Last edited:
@Russ $xf.reply.template == 'thread_view' might be what you're after? I use a kind of similar display condition that hides a sub-navigation item based on the active main navigation tab with $xf.reply.section. This way I can have a couple of shortcuts under the "Home" section without them showing up if browsing other sections.
 
Last edited:
Back
Top Bottom