1. 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?

Discussion in 'XenForo Questions and Support' started by RoldanLT, Jul 22, 2013.

  1. RoldanLT

    RoldanLT Well-Known Member

    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>
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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 likes this.
  3. RoldanLT

    RoldanLT Well-Known Member

    What about having a code like this:
    Code:
    <xen:if is="{$contentTemplate} == 'empty' ">
    
    </xen:if>
    or
    Code:
    <xen:if is="{$contentTemplate} == '' ">
    
    </xen:if>
     

Share This Page