Hi there,
I've created the following partial:
{% if flashSession.getMessages()|length > 0 %}
<div class="row">
<div class="small-12 columns">
{{ flashSession.output() }}
</div>
</div>
{% endif %}
If I leave the length test in, when it is true, my markup is output but flashSession.output() returns nothing. If I comment out the length test, when there are messages, flashSession.output() works as expected.
It seems like calling getMessages() to check the count removes the messages? Basically, I'm checking for existence of messages to avoid outputting extraneous markup when there is no need to.
Am I misunderstand something?
Many thanks.