templates/default/_flash_messages.html.twig line 1

Open in your IDE?
  1. {#
  2.    This is a template fragment designed to be included in other templates
  3.    See https://symfony.com/doc/current/book/templating.html#including-other-templates
  4.    A common practice to better distinguish between templates and fragments is to
  5.    prefix fragments with an underscore. That's why this template is called
  6.    '_flash_messages.html.twig' instead of 'flash_messages.html.twig'
  7. #}
  8. <div class="messages">
  9.     {% for type, messages in app.flashes %}
  10.         {% for message in messages %}
  11.             {# Bootstrap alert, see http://getbootstrap.com/components/#alerts #}
  12.             <div class="alert alert-dismissible alert-{{ type }}" role="alert">
  13.                 <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  14.                     <span aria-hidden="true">&times;</span>
  15.                 </button>
  16.                 {{ message|trans }}
  17.             </div>
  18.         {% endfor %}
  19.     {% endfor %}
  20. </div>