Skip to content

Commit

Permalink
[symfony/twig-bundle] add flash messages to base.html.twig
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Apr 29, 2022
1 parent 7d43cf1 commit 975609f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions symfony/twig-bundle/5.4/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
{% endblock %}
</head>
<body>
{% if app.request.hasPreviousSession %}
{% for type, messages in app.flashes %}
{% for message in messages %}
<div class="alert alert-{{ type }}" role="alert">
{{ message }}
</div>
{% endfor %}
{% endfor %}
{% endif %}

{% block body %}{% endblock %}
</body>
</html>

0 comments on commit 975609f

Please sign in to comment.