Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -1,39 +1 @@
|
||||
{#
|
||||
This template is used to render any error different from 403, 404 and 500.
|
||||
|
||||
This is the simplest way to customize error pages in Symfony applications.
|
||||
In case you need it, you can also hook into the internal exception handling
|
||||
made by Symfony. This allows you to perform advanced tasks and even recover
|
||||
your application from some errors.
|
||||
See http://symfony.com/doc/current/cookbook/controller/error_pages.html
|
||||
#}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="{{ _charset }}" />
|
||||
<title>{{ 'http_error.title'|trans({}, 'exceptions') }}: {{ status_text }}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% set errorTitleKey = "http_error_#{status_code}.description" %}
|
||||
{% set errorTitleTrans = errorTitleKey|trans({ '%status_code%': status_code }, 'exceptions') %}
|
||||
{% if errorTitleKey == errorTitleTrans %}
|
||||
{% set errorTitleKey = 'http_error.description' %}
|
||||
{% set errorTitleTrans = errorTitleKey|trans({ '%status_code%': status_code }, 'exceptions') %}
|
||||
{% endif %}
|
||||
|
||||
{% set errorMessageKey = "http_error_#{status_code}.suggestion" %}
|
||||
{% set errorMessageTrans = errorMessageKey|trans({ '%status_code%': status_code }, 'exceptions') %}
|
||||
{% if errorMessageKey == errorMessageTrans %}
|
||||
{% set errorMessageKey = 'http_error.suggestion' %}
|
||||
{% set errorMessageTrans = errorMessageKey|trans({ '%status_code%': status_code }, 'exceptions') %}
|
||||
{% endif %}
|
||||
|
||||
<h1>{{ errorTitleTrans }}</h1>
|
||||
<h2>{{ status_code }}: {{ status_text }}</h2>
|
||||
|
||||
<div>
|
||||
{{ errorMessageTrans }}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% extends '@Tabler/error.html.twig' %}
|
||||
|
||||
Reference in New Issue
Block a user