Symfony 5 flash messages inside div

in Symfony 5 if I use the documented

<div id="flash-message">
{% for label, messages in app.flashes %}
    {% for message in messages %}
        <div class="alert alert-{{label}}" role="alert">
            {{ message }}
            {#{{ message|trans|raw }}#}
        </div>
    {% endfor %}
{% endfor %}
</div>

messages are display but outside the div #flash-message which is closed before the div .alert opens.
Why this behaviour?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *