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