{% if app.request.hasPreviousSession and (app.session.flashbag.peek('notice')|length > 0 or app.session.flashbag.peek('error')|length > 0) %}
{% for message in app.flashes('notice') %}
Alert!
{{ message|raw }}
{% endfor %} {% for message in app.flashes('error') %}
Alert!
{{ message|raw }}
{% endfor %}
{% endif %}