• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Conditional for Resource pages

popowich

Active member
#1
What's the conditional for resource pages?

For example, I use this one related to the home page:

<xen:if is="{$contentTemplate} == 'forum_list'">

Thanks!
 

popowich

Active member
#2
Also related to resources, is there a permission that turns off the behavior that cuts off resource page content for visitors?

I don't see anything in the group permissions.
 

Brogan

XenForo moderator
Staff member
#3
The FAQ in my signature explains how to identify the template name.

The content limit is set here:
 

popowich

Active member
#4
I wonder if Brogan's mind is going "Yeah, can't stop posting questions from the FAQ! (but thanks for the posts)" <sarcasm>

xenforo can't stop.jpg
 

popowich

Active member
#6
For anyone else who needs this, here is an answer:

<xen:if is="{$contentTemplate} == 'forum_list' OR {$contentTemplate} == 'resource_description'">

Maybe it was doable with an array too, like this syntax with the correct template names:

<xen:if is="!in_array({$contentTemplate}, array('message_page', 'error', 'search_form', ......