How does one set a flash message in the templates? I can't find any documentation about this, only for plugins or getting the message.
My use-case is, I am checking if a user is allowed to access a certain page and if they cannot I want to set a flash message, then redirect them to another page. I prefer this than to keep them on the same page and is if else logic to show the message or the rest of the page.
Thanks
{% redirect %}
tag.{% redirect %}
tag: docs.craftcms.com/v3/dev/tags/redirect.html#flash-messages