XF 1.2 Is there a list of template conditionals?

Code Monkey

Well-known member
How would I check if the template used is one of 5 templates using conditionals? Say I have a list of templates and I only want to display something if I am viewing the pages that use those templates.

Code:
thisapp_public_index
thisapp_public_page1
thisapp_public_page2
thisapp_public_page3
member_view
 
Thanks

So something like this might work?

Code:
<xen:if is="in_array({$contentTemplate}, array(thisapp_public_index, thisapp_public_page1, thisapp_public_page2, thisapp_public_page3, member_view))">
    //display the stuff
</xen:if>
 
Ahh this works. Need to quote the template names.

Code:
<xen:if is="in_array({$contentTemplate}, array('thisapp_public_index', 'thisapp_public_page1', 'thisapp_public_page2', 'thisapp_public_page3', 'member_view'))">
   //display the stuff
</xen:if>
 
Back
Top Bottom