{% with messages = get_flashed_messages(with_categories=True, category_filter=["submission-preferences-success"]) %} {% for category, message in messages %} {# Get the end of the of the category message which contains the category status.(success/error)#} {% set category_status = category[23:] %}
{{ message }}
{% endfor %} {% endwith %}