In my 404 template I am extending a layout template. Inside that layout template I want to hide a section use an {% if craft.request... == 404 %} test. Any ideas on how I can accomplish this?

  • I found a solution after I posted this... this seems to work but I am not sure if it is accurate. {% if not entry %}
    – Taylor
    Commented Jul 2, 2015 at 19:24

1 Answer 1


That solution is viable. You can just test to see if the entry or the template matches your 404 template/entry. If you routed everything correctly to display a 404 in case of error, you should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.