The Messages component displays a notification to a user about an action taken.
Currently messages are only used to notify a user when:
- An asset is added to the cart
- An asset already exists in their cart
- When an asset has been added to the downloads list (AEM as a Cloud Service 2.0+)
If no text is associated with a message, then no message is displayed.
There is no authoring directly on the Messages component. The messages for adding/exists in cart are configured via the Search Page properties.
Dialog / Page Properties section on Search Page’s Asset Share tab
The color/style to display the message as
The text to display on the notification
More details can be found on the Search Page documentation.
- Sling Models:
Messages are stored under the search page in the following node structure:
If a new message node structure is added under the messages node, it will be automatically made available on the asset share pages under that search page.
AssetShare.Messages..show(<eventId>); /// ... so to show the card-add, this might look like: AssetShare.Messages.show('cart-add');