{% extends '@Tabler/fullpage.html.twig' %} {% block title %}{{ status_text|trans({}, 'TablerBundle') }}{% endblock %} {% block page_content %} {% set errorTitleKey = "http_error_#{status_code}.title" %} {% set errorTitleTrans = errorTitleKey|trans({ '%status_code%': status_code }, 'TablerBundle') %} {% if errorTitleKey == errorTitleTrans %} {% set errorTitleKey = 'http_error.title' %} {% set errorTitleTrans = errorTitleKey|trans({ '%status_code%': status_code }, 'TablerBundle') %} {% endif %} {% set errorMessageKey = "http_error_#{status_code}.description" %} {% set errorMessageTrans = errorMessageKey|trans({ '%status_code%': status_code }, 'TablerBundle') %} {% if errorMessageKey == errorMessageTrans %} {% set errorMessageKey = 'http_error.description' %} {% set errorMessageTrans = errorMessageKey|trans({ '%status_code%': status_code }, 'TablerBundle') %} {% endif %} {% set errorSuggestionKey = "http_error_#{status_code}.suggestion" %} {% set errorSuggestionTrans = errorSuggestionKey|trans({ '%status_code%': status_code }, 'TablerBundle') %} {% if errorSuggestionKey == errorSuggestionTrans %} {% set errorSuggestionKey = 'http_error.suggestion' %} {% set errorSuggestionTrans = errorSuggestionKey|trans({ '%status_code%': status_code }, 'TablerBundle') %} {% endif %} {% if errorSuggestionKey != errorSuggestionTrans and errorMessageKey != errorMessageTrans %} {% set errorTitleTrans = errorMessageTrans %} {% set errorMessageTrans = errorSuggestionTrans %} {% endif %}
{% block error_title %} {% if errorTitleKey != errorTitleTrans %} {{ errorTitleTrans }} {% else %} {{ status_text }} {% endif %} {% endblock %}
{% block error_subtitle %} {{ errorMessageTrans }} {% endblock %}