Part of the Notify ecosystem · 5 projects
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.
Ask your assistant about Notify Widget
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
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Notify ecosystem
Most installed first
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.15 | Stable | 10–11 | Jan 15, 2026 | ||
| 1.0.13 | Stable | 10–11 | Jan 14, 2026 | ||
| 1.0.12 | Stable | 10–11 | Dec 17, 2024 | ||
| 1.0.11 | Stable | 10–11 | Mar 14, 2024 | ||
| 1.0.10 | Stable | 10–11 | Mar 4, 2024 | ||
| 1.0.9 | Stable | 10–11 | Feb 15, 2024 | ||
| 1.0.8 | Stable | 10–11 | Feb 15, 2024 | ||
| 1.0.7 | Stable | 10–11 | Dec 16, 2023 | ||
| 1.0.5 | Stable | 10 | Dec 6, 2023 | ||
| 1.0.4 | Stable | 10 | Nov 24, 2023 |