To display a Superblocks notification toast whenever a realtime notification is received, we need the Weavy Notification Events to generate events that we can act on.
The component needs to be placed where it's always loaded, for instance in the Header. The only visual appearance it has is a spinner while loading, but you can turn the spinner off in the properties of the component.
We can choose whether to use Weavy's built in notifications toasts or make use of Superblocks alerts to show notifications.
- Drag the Weavy Notification Events component onto your page canvas (somewhere its always visible).
Using Weavy's built in notification toasts...
- Set an event handler for the On Navigate event to Trigger event.
- Choose the
App.navigateFromNotification
event.
- Set the navigateData field to
WeavyNotificationEvents1.navigateData
. Make sure the name matches the name of your Weavy Notification Events component.
...or using Superblocks Alerts. Note that the alerts can't handle any navigation.
- Set an event handler for the On Notification event to Show Alert.
- Set the Message to
{{WeavyNotificationEvents1.notificationTitle}}
.