8000 bug #5431 Updated the code to display flash messages (aykin, javiereg… · symfony/symfony-docs@f905157 · GitHub
[go: up one dir, main page]

Skip to content

Commit f905157

Browse files
committed
bug #5431 Updated the code to display flash messages (aykin, javiereguiluz)
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #5431). Discussion ---------- Updated the code to display flash messages | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - Commits ------- c2676ae Improved the code used to display flash notices 176cdc6 Update the_controller.rst
2 parents e15eb21 + c2676ae commit f905157

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

quick_tour/the_controller.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,11 @@ And you can display the flash message in the template like this:
330330

331331
.. code-block:: html+jinja
332332

333-
<div>
334-
{{ app.session.flashbag.get('notice') }}
335-
</div>
333+
{% for flashMessage in app.session.flashbag.get('notice') %}
334+
<div class="flash-notice">
335+
{{ flashMessage }}
336+
</div>
337+
{% endfor %}
336338

337339
Final Thoughts
338340
--------------

0 commit comments

Comments
 (0)
0