{% flash %}
The {% flash %}
and {% endflash %}
tags will render any flash messages stored in the user session, set by the Flash
PHP class. The message
variable inside will contain the flash message text and the markup inside will repeat for multiple flash messages.
You can use the type
variable that represents the flash message type - success
, error
, info
or warning
.
You can also specify the type
to filter flash messages of a given type. The next example will show only success
messages, if there is an error
message it won't be displayed.
If you are using the Snowboard Flash utility in your theme, you should use the following code to ensure that flash messages are handled correctly by this utility:
Setting flash messages
Flash messages can be set by Components or inside the page or layout PHP section with the Flash
class.