{%- with messages = get_flashed_messages(with_categories=true) -%} {% if messages %} {% endif %} {%- endwith %}