Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Alert messages

161 sites Security covered Drupal 11 · not 10
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.

Depends on

Dependencies of the latest stable release

  • Entity API
  • block Drupal core
  • datetime Drupal core
  • text Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Oct 2024
Latest release
6 months ago
Releases (12 mo)
4 ▲ from 2
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.1.1 Stable 11 Feb 3, 2026
1.1.0 Stable 10–11 Jan 9, 2026
1.1.x-dev Dev 11 Jan 9, 2026
1.0.5 Stable 10–11 Sep 9, 2025
1.0.3 Stable 10–11 Oct 24, 2024
1.0.2 Stable 10 Oct 24, 2024