2 Dismissible Alerts Via Lava Short code Shared by Tony Visconti, College Church 3 months ago 16.5 Administration / Finance Advanced WhatCreate dismissible alerts for users that will only be shown once to users to highlight new features of time-sensitive communication.ExamplesSite-wide Modal AlertPage Specific Standard AlertWhyThere are some pieces of content users only need to see once. I needed a simple reuseable mechanism for adding this content to a page and hiding it on all future page loads after the user dismissed the alert. I also want to deliver critical information via pop up modals whereas other alerts were needed somewhere specific on the on the page.HowTo build out this recipe we are going to leverage boostrap alerts and bootstrap modals. To remember that a user has dissmissed an alert we are going to leverage the localStorage property, a web storage mechanism that allows websites to store key-value pairs in a user's browser.To get started navigate to your Lava Shortcode page Home > CMS Configuration > Lava ShortcodesAdd a new Lava Shortcode with the following SettingsName: Dismissible AlertTag Name: alertdismissibleDescription: Provide an alert to a user that will not show up again after they dismiss it.Documentation: https://pastebin.com/RFvV10B6Make sure to click into the Code Editor before adding the html/lava below for the documentation fieldShortcode Markup: https://pastebin.com/gUWXUic9Parameters:Here are a couple examples of how you might use this shortcode:{[ alertdismissible alertId:'test2-14-23-1' message:'Test Message' alertClass:'info']} {[ alertdismissible alertId:'test2-14-23-2' message:'Test Message' alertClass:'info' type:'modal' title:'Important Notification']}If you update the message of an alert you may also want to update the alertId value so that users who previously dismissed the alert see the updated alert message.Creating a site-wide modal notificationIf you want to add a notification that will displayed site wide follow the steps below:Navigate to the Page Editor Page: Home > CMS Configuration > PagesSelect any page that belongs to the site (Internal/External...) you want the notification to appear onSelect the footer zone for editingAdd an html content block to the Site areaAdd you dismissible lava short code to the block Download File