S sajal Active member Mar 28, 2017 #1 Is there any quick way to check/put conditional in the template to make sure it's front-page of the forum?
Is there any quick way to check/put conditional in the template to make sure it's front-page of the forum?
Mike XenForo developer Staff member Mar 28, 2017 #2 Can you expand on the context and what template you're referring to specifically? The front page of the forum would generally be the forum_list template so if you're adding things there, that would be sufficient. Upvote 0 Downvote
Can you expand on the context and what template you're referring to specifically? The front page of the forum would generally be the forum_list template so if you're adding things there, that would be sufficient.
X xenfans Well-known member Mar 28, 2017 #3 I use this in (any) template if I want to check *against* being loaded on the frontpage (or not) : Code: <xen:if is="{$viewName} == 'XenForo_ViewPublic_Forum_List'">..</xen:if> Upvote 0 Downvote
I use this in (any) template if I want to check *against* being loaded on the frontpage (or not) : Code: <xen:if is="{$viewName} == 'XenForo_ViewPublic_Forum_List'">..</xen:if>
S sajal Active member Mar 29, 2017 #4 Thanks @xenfans. @Mike, I wanted to check it for Widget framework conditional field. Upvote 0 Downvote
P Paul B XenForo moderator Staff member Mar 29, 2017 #5 You will have to ask in the add-on thread - we aren't familiar with the widget framework code. Upvote 0 Downvote