Core Concepts
Notification Bars
Concept
Notification Bars display quick information or announcements at a glance; these could be site-wide announcements of a limited-time sale, informational alerts about products, notification about an upcoming event, etc.
Usage
Similar to Menus, Notification Bars are accessed through their Name property.
An example is a User creates a new Notification Bar named "Announcement Banner" under the Placement "Above Header." Using the Notification Bar View Composer, that Notification Bar is auto-injected onto a Page and is grouped by its placement, i.e. `above_header`.
Autoload comes with a Component Helper to render these Notification Bars, you can use it like so; passing the name of the Placement group to render.
This will only render the FIRST Notification Bar in the group.
1<x-autoload::notification-bar placement="above_header" />
There are several other options available when rendering a Notification Bar;
- "tag" = which HTML tag to wrap the Notification Bar's content with, default is "div."
- "stripTags" = meaning the Notification Bar will be rendered as is, without HTML parsing.
- "class" = is any CSS styling you wish to apply to the Notification Bar.
1<x-autoload::notification-bar2 tag="p"3 stripTags4 placement="above_header"5 class="text-sm text-center uppercase"6/>