rellek Well-known member Aug 18, 2013 #1 Hi, is there an easy way to find out if a page a 404 or 403 message? I'd like to make an exception in the templates (if cond1 and cond2 and not 404 and not 403 then display something). Thanks
Hi, is there an easy way to find out if a page a 404 or 403 message? I'd like to make an exception in the templates (if cond1 and cond2 and not 404 and not 403 then display something). Thanks
Mike XenForo developer Staff member Aug 18, 2013 #2 I don't believe that's exposed at the template level. Upvote 0 Downvote
rellek Well-known member Aug 18, 2013 #3 Okay... Could one find out if the current page represents an error (like any error) then? Upvote 0 Downvote
rellek Well-known member Aug 18, 2013 #4 Okay, I think I found a solution. This seems to work. Question: Is there anything wrong with this? Code: <xen:if is="strpos({xen:raw $contents}, 'errorOverlay')"> This only appears only if there's an error... </xen:if> Upvote 0 Downvote
Okay, I think I found a solution. This seems to work. Question: Is there anything wrong with this? Code: <xen:if is="strpos({xen:raw $contents}, 'errorOverlay')"> This only appears only if there's an error... </xen:if>