Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

An alert banner

The Alert block (Message, Type, Dismissible) for a short notice, or a template block.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/build-two-ways/examples/build/alert-banner.md

On this page

An alert banner

A one-line notice: "Our gym is closed on Monday."

Life cycle: Build, example 13 of 35. Worked out on the Fit & Healthy site of Exponential 6.0.15+.

Contents

  1. In the Layouts editor
  2. With templates
  3. Which to choose
  4. Check

In the Layouts editor

  1. Open Layouts > Layouts and the layout Landing Page / Home; the editor opens it in a draft.
  2. Open the block palette (+ at the top left) and drag Alert (group Basic) into the zone post_header.
  3. Select the block, open the Design tab and fill Message, Type (default info) and Dismissible.
  4. Publish layout. The pages that use the layout show the block on their next view.

The standard template writes <div class="slb slb-alert alert alert-<type>">. For the same alert on every page, put it in a shared layout's zone and link that zone from the layouts: the Fit & Healthy layouts link only header and footer of Header / Footer, so its post_header is not shown anywhere yet.

With templates

  1. Write extension/mysite/design/media/templates/explayouts/tpl_block/closure_notice.tpl in your design extension, clear the template cache, and place it with a Template block whose Template name is closure_notice (Your own template blocks).

Which to choose

A notice editors switch on and off: the block. A notice driven by data (opening hours from a content item): the template.

Check

  • The alert appears on the pages whose layouts include it.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x