• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Conditional Statements for XenForo 2

Conditional Statements for XenForo 2

#64
To get some variables to work in all ad positions, they need to be referenced as global like {$__globals.forum.node_id} instead of forum.node_id
 
#66
Looking for a conditional statement for thread view that combines two requirement.
Not to appear in particular forum <xf:if is="{$__globals.forum.node_id} != XXX">
Only appear if thread has more than Y number of posts.
 

DL6

Well-known member
#69
Did anyone have luck with detecting the default dynamic avatars? This would be good to have!
Code:
<xf:if is="$xf.visitor.getAvatarType() == 'default'">content</xf:if>
Hi there, I have read all the comments and everything but still haven't figured out how to add a widget to a specific thread, say thread number 5662

Any help?

Thanks
1. Create the widget you want to show in that thread with no position set.
2. Put this in a html widget in the Thread view: Sidebar position.
Code:
<xf:if is="$context.thread.thread_id == 5662">
    <xf:widget key="widget_key" />
</xf:if>
3. Replace widget_key with the widget key you made in step 1.
4. Check advanced mode and save.