How to define custom error pages

Introduction

You should always define at least one error page. With the Skelton you can easle defined custom error page per HTTP return code. Let see how.

Error template

Create a template document with this content:

  • Key: error.html.twig

Code:

{% extends '@EMSCH/template/base.html.twig' %}
{%- trans_default_domain trans_default_domain -%}

{%- block body -%}
    {{ 'error'|trans }}
{%- endblock body -%}