Skip to content

Commit 975609f

Browse files
committed
[symfony/twig-bundle] add flash messages to base.html.twig
1 parent 7d43cf1 commit 975609f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

symfony/twig-bundle/5.4/templates/base.html.twig

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
{% endblock %}
1515
</head>
1616
<body>
17+
{% if app.request.hasPreviousSession %}
18+
{% for type, messages in app.flashes %}
19+
{% for message in messages %}
20+
<div class="alert alert-{{ type }}" role="alert">
21+
{{ message }}
22+
</div>
23+
{% endfor %}
24+
{% endfor %}
25+
{% endif %}
26+
1727
{% block body %}{% endblock %}
1828
</body>
1929
</html>

0 commit comments

Comments
 (0)