I want to add support for flash messages on our pages. I implemented this by following the documentation found here.
I added the following snipplet to my base layou
By symfony 2.6 +
{% if app.session.flashbag.has('notice') %} {{ app.session.flashbag.get('notice').0 }} {% endif %}
Because flashbag is by this version array you need foreach it or use index. I m using index because i dont need something more.