EKM Tag: announcement_bar
This tag is designed for outputting a site wide bar containing a message to the customer as part of the Quick Announcement feature. It can also be used to add site-wide messaging to the Holiday Mode feature.
- Tag Information
The announcement_bar is designed to appear at the top of the EKM Shop and is 'sticky', meaning that it will follow the user down the page as they scroll.
[ekm:announcement_bar]
output_start='<div>';
output_end='</div>';
height_change_callback='
<script>
function fixFixedHeader(height){
var el = document.querySelector('.header-section.sticky-area');
if (!el) return;
el.style.top = height + 'px';
}
</script>
';
[/ekm:announcement_bar]
ekm:announcement_bar
tag.
[ekm:announcement_bar]
output_start='';
output_end='';
height_change_callback='';
include_javascript='';
include_list='';
[/ekm:announcement_bar]
Here you can specify what will be output at the start of the ekm:announcement_bar
. Typically you would start to output some HTML.
Example: You could open a containing div
at this point followed by a class
attribute in order for you to target the bar with custom styling.
Here you will close any HTML tags that were opened within the output_start
attribute.
output_start
attribute.Allows you to specify the name of a JavaScript function in the global scope that will be called when the height of any announcement bars change.
This is useful if you have other "sticky" elements in the theme and you want to offset them when a bar exists in the page or the bar resizes due to screen size adjustments.
script
function or write your own.Here you can specify whether or no to output the tag JavaScript.
Here you can specify the announcements you wish to include within the output. (Note: You can add multiple values by separating them with a comma)