I want to have different error pages for 404 and 500 errors. How can I do that?
I work in production environment only. I overrided twig error templates and put them in app/Resources/TwigBundle/views/Exception
folder.
I wanted to create two files there:
error404.html.twig
exception_full.html.twig
This way if it's 404 it would open the first file, and in any other case it would open the other one.
I have a couple of problems though:
- the first file never opens on 404 error...only the second, and symfony default if it doesn't exist
- I can't extend the base template in neither of them (
{% extends '::layout.html.twig' %}
), because if I use it the template just doesn't load
Any suggestions?
Thanks!