29-Oct-2026

Adding a Top Banner to Neto

Add an informative banner to your website to convey succinct important information to your customers.

Top Banner for Neto Using Content Zones

The top banner, shown below, is used for brief and important information. In Neto it's done with Content Zones, located at /_cpanel/Webstore/Content Zones. User ones can be created, deleted and edited, but the system ones can only be edited.

Editing the content is easy with source code and WYSIWYG options with full HTML being available. The content is inserted into the website using the Content Zone tag.

For example, for the "header_announcement", put [%content_zone id:'header_announcement'%][%/content_zone%] into the page HTML where it's needed. The code shown on the Content Zone editing page is incorrect.

Content Zones can also be used in shop emails.

Making the Top Banner Dismissible

To comply with modern user interface standards the top banner should be able to be dismissed and removed from view if the user choses so.

	<div id="header-message" style="display: none;">
		<div class="header-message">
			[%content_zone id:'header_announcement'%][%/content_zone%]
		</div>
		<button aria-label="Close header message" id="header-message-close-button">✕</button>
	</div>

Saving the Banner State

So the user doesn't need to dismiss the banner every time they visit your website, use some JavaScript to save the state as a cookie.

    Close the header message banner when the close button is clicked. Keep setting over user session so that the banner does not reappear until the next session. 
    */
    if (localStorage.getItem('headerMessageClosed') === 'true') {
        $('#header-message').hide();
    } else {
        $('#header-message').show();
    }

    $('#header-message-close-button').click(function() {
        $('#header-message').slideUp('fast');
        localStorage.setItem('headerMessageClosed', 'true');
    });

Leave a Reply

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram