Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Alert messages

Security covered Maintenance fixes only 161 sites

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.

Drupal 11 · not 10

Ask your assistant about Alert messages

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
9
Tracked since
May 2023
Latest release
8 months ago
Releases (12 mo)
3
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP 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
1.0.1 Stable 10 PHP 8.1 Feb 21, 2024
1.0.0 Stable 9–10 PHP 8.1 May 22, 2023
1.0.x-dev Dev 10–11 May 11, 2023