{% sw_extends '@Storefront/storefront/utilities/alert.html.twig' %} {# Global messages template https://getbootstrap.com/docs/4.3/components/alerts/ *Type: The template provides an easy way to display messages in the storefront. The following types are supported: * primary * secondary * danger (red) * success (green) * warning (yellow) * info (blue) * light (white) * dark (dark gray) {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type:"primary", content:"Primary Lorem ipsum dolor" } %} *Icons: Icons are shown by default. To hide the icon within the alert, set the value of "icon" to false: {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type:"primary", content:"Primary Lorem ipsum dolor", icon: false } %} *Message Content: The component requires the parameters ```content``` or ```list``` to display a message. If no ```type``` is defined it will use the fallback option (success). {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type:"primary", content:"Primary Lorem ipsum dolor" } %} *Message List: If you need to display a bunch of messages (for example error messages in the registration), you can pass an array of messages to the template using the parameter ```list```: {% set list1 = [ 'Error message 1', 'Error message 2', 'Error message 3' ] %} {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type:"secondary", list: list1 } %} *Heading: To display a heading, use "heading". {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type:"primary", content:"Primary Lorem ipsum dolor", heading: "Test Heading" } %} *Dismissible Button: To display a dismissible button set the value of "dismissible" to true. {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type:"primary", content:"Primary Lorem ipsum dolor", dismissible: true } %} #} {% block utilities_alert %} {% endblock %}