Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Alert messages

167 sites Security covered
View on drupal.org

This module allows administrators to display temporary notifications to website visitors. These alerts can be customized with specific visibility rules for different users or roles, can be dismissed, and can be scheduled for display.

Alert Message is a lightweight module that provides an easy way for administrators to display important temporary notifications to website visitors. These notifications can be configured to appear for anonymous users, logged-in users, specific individuals, or specific user roles.

Key Features

  • Dismissible Alerts: Users can click a notification to dismiss it for the duration of their browser session.
  • Customization Options: Administrators can create multiple messages with distinct visibility criteria. Messages can be displayed in the top highlighted area or within a dedicated section of the page. Additionally, alerts can be scheduled for future publication and removal via cron.
  • User and Role Targeting: Administrators can restrict alerts to specific groups based on assigned roles (e.g., editors, content authors) or individual usernames.
  • Translatable: All alert messages are fully translatable.
  • Custom Theming: The module includes a basic template, which developers can override to further customize the visual appearance of the alerts.
  • Lightweight: A minimal module with only one dependency: the Entity module.

How to Use

  1. Place the Alert Message block in the desired region of your layout.
  2. Create an alert message via the module's administrative interface.
  3. Hide non necessary fields from the alert message display
  4. Optionally, override the template file to customize the theme and appearance of your alerts.

How does this module compare to Notification Message?

The primary difference lies in the architectural approach. This module leverages Drupal core features to remain lightweight and relies on invalidating the alert message block cache to determine visibility. This method effectively prevents Cumulative Layout Shift (CLS).

Since version 1.1.0, the module has utilized Lazy Builders to render the block. This leverages the Dynamic Page Cache, which significantly improves performance and keeps the cache table size to a minimum.

Using with Varnish

This module is compatible with Varnish. However, due to how Drupal handles caching for anonymous users, the Dynamic Page Cache will always be used once a user dismisses an alert. Though, the page should be normally served via Varnish until the former happens.

Activity

Total releases
4
First release
Sep 2025
Latest release
5 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.1.1 Stable Feb 3, 2026
1.1.0 Stable Jan 9, 2026
1.1.x-dev Dev Jan 9, 2026
1.0.5 Stable Sep 9, 2025