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

XF 1.1 xen:if condition to detect error 404 pages?

RoldanLT

Well-known member
#1
Like Page not found, Thread not found, Forum not found error pages.
Something like:
Code:
<xen:if is="404_error_pages">
Do not display this content
</xen>
 

Brogan

XenForo moderator
Staff member
#2
It's not possible as far as I know as the error pages don't use a template as such.

They are done as a responseMessage which doesn't have a wrapper.

For example, this is the HTML: <div id="content" class="">

Note how there is no class, which is typically where the template name would be.
 

RoldanLT

Well-known member
#3
What about having a code like this:
Code:
<xen:if is="{$contentTemplate} == 'empty' ">

</xen:if>
or
Code:
<xen:if is="{$contentTemplate} == '' ">

</xen:if>