ibrian
Well-known member
I'm trying to set up a widget to only appear in a particular style, and have followed the instructions in this thread: https://xenforo.com/community/threads/conditionals-for-widgets.137561/
1. Set up widget with advanced selected but no positions, which calls up a 2nd widget
2. 2nd widget has positions selected and conditional trigger
However, I can't figure out the conditional statement required for 2.
So far I've tried:
but neither works - the widget still appears regardless of the style ID.
Could someone please advise what the conditional statement required for styles is, please?
1. Set up widget with advanced selected but no positions, which calls up a 2nd widget
2. 2nd widget has positions selected and conditional trigger
However, I can't figure out the conditional statement required for 2.
So far I've tried:
Code:
<xf:if is="$xf.visitor.style_id == X">
<xf:widget key="widget_name" />
</xf:if>
Code:
<xf:if is="$style_id == 'x'">
<xf:widget key="widget_name" />
</xf:if>
but neither works - the widget still appears regardless of the style ID.
Could someone please advise what the conditional statement required for styles is, please?
