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.

Notify Widget

108 sites Security covered
View on drupal.org

This module adds a notification widget to your site, displaying an icon with a count of unread messages. Notifications link directly to their content and are automatically marked as read upon clicking. It also provides a service to send notifications to single or multiple users programmatically.

Provides a notifications widget that adds a notifications icon to the page for the user to access their notifications. The icons displays an iOS style red badge containing the number of unread notifications, and each notification has a click-thru link that automatically sets the notification status to read when clicked.

The module also provides a service (notify_widget.api) that has a send() method and it is this method that should be used to set up notification for users, eg.

Sending to a single user

\Drupal::service('notify_widget.api')->send(
  '<module_name>',
  'warning',
  'Password Expiry!',
  'Your password is about to expire in 5 days.',
  1,
  '/user/pasword'
);

Sending to multiple users

\Drupal::service('notify_widget.api')->send(
  '<module_name>',
  'warning',
  'Password Expiry!',
  'Your password is about to expire in 5 days.',
  [1, 2, 3],
  '/user/pasword'
);

The first example will set a notification for user 1 (top admin), notifying them of the fact that their password will soon expire, and the notification will link to the user password page. The first argument is the "source" argument, and can take any value, but it is suggested to use the name of the module that sets the notification. As yet, the value is unused, but may be used in the future to filter notifications.

The second example above will send the same notification, but it will go to users 1, 2, and 3.

To display the notifications on the site, go to the block layout page and add the "Notify Widget" block to a region on your site. Set the block so that it only displays for authenticated users.

The notify widget settings can be reached under Configuration > System > Notify Widget Settings, and settings include the maximum number of notifications and whether to use the CSS included with the module or not. If you choose not to use the CSS provided, you must style the notifications in your own theme.

Activity

Total releases
2
First release
Jan 2026
Latest release
6 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.15 Stable Jan 15, 2026
1.0.13 Stable Jan 14, 2026