TYPO3 version: > 9.5
Offers a backend module, where editors can manage notifications, to be shown on the website. Additionally, these notifications can be sent as push notifications through the browser. In order for the browser push notifications to work, you have to create a firebase project and configure your API credentials within our website base configurator. The extension also contains two dashboard widgets for the editors.
Notification record structure
|title||The notification's title||No||-|
|description||The main content of the notification, maximum 1000 character allowed (firebase push notification limitation)||Yes||-|
|url||The URL for the "read more" link in the frontend||No||-|
|layout||Defines which layout to use when showing the notification in the frontend.||No||banner--top|
|is_active||Defines which notification is shown in the frontend. ONLY one notification per language can be active at a time.||No||FALSE|
|send_push_notification||Defines whether or not this notification should also be send as a push notification.||No||FALSE|
|sendtime||The time when the push notification should be sent (the scheduler tasks checks this when running).||No||0|
|sent||Readonly field, which indicates whether this notification was already sent. This field is automatically filled by the scheduler task.||No||FALSE|
|senttime||Readonly field, which indicates when this notification was sent. This field is automatically filled by the scheduler task.||No||-|
- ActiveNotificationWidget: Shows the notification, that is currently active on the website (is_active = 1).
- LastSentNotificationsWidget: Shows the last X notifications that have been sent.
IMPORTANT: In a multi-domain setup, the widgets will show records from the first domain found, where the user has access to.
When a notification record is created or updated, a hook is executed, which does two things:
- Trigger the email sending, in case the record has is_active = 1 (take a look at the mail template for details about what is actually being sent).
- Mark other notification records as inactive. "Other" notifications in this case refer to notifications that are not a translation of the modified record, nor its l10n_parent (in case the modified record is already a translated record).
The following settings can be accessed from the TYPO3 backend module "Settings":
|generalStorageId||Here you can define a PID, which will show up in the backend module next to the siteroots that have been found. It can then be selected in the backend module and can be used for storing the created notifications.||No||-|
|sendEmailsOnNotificationUpdate||When checked, updating a notification triggers sending an email (sg_mail template "notification_change") to the address defined in the mail template "notification_change".||No||FALSE|
|enablePushNotificationFields||When checked, an additional TCA palette, containing push notification (firebase) related fields is shown within the notification record TCA.||No||FALSE|
The first step is to create a firebase project, see: https://firebase.google.com/docs/web/setup/#create-firebase-project
Once you've done this, you need to add a web app to your project. After adding a web app, firebase will offer you a code snippet, containing all the configuration variables that are needed.
Here you can find more information regarding the various configuration variables: https://firebase.google.com/docs/web/setup/#config-object
When you have sucessfully completed the steps above, you can copy & paste the configuration values from firebase into the website base configurator (website configuration backend module, provided by EXT:project_theme_configurator). You will also find documentation for the different variables in there.