Manage and author Custom Error message for Modal component | Community
Skip to main content
Level 3
Mar 4, 2021 6:05 AM UTC
Solved

Manage and author Custom Error message for Modal component

Hi,

 

We have a requirement to store UI validation Message and  Backend error message(displayed as modal)  in AEM so they are authorable. 

These error messages will be used across pages in site . Can someone suggest best way to manage it . Is it advisable to have a page dedicated for managing error messages where content authors can edit and manage error messages or create experience fragments for group of error messages to be referenced.

This is a React Application where the content is passed as Json to Front End.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Mar 7, 2021 7:59 PM UTC

The experience fragment approach looks fine, you can use some selector lets says /content/exper...../button-invlaid.content.html to remove unnecessary content,

You can try to create an error container component with another experience fragment button-erorr.modal.json which can refer above experience fragment as a group and messages can be grouped and reused.   

Arun Patidar

3 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Mar 7, 2021 7:59 PM UTC

The experience fragment approach looks fine, you can use some selector lets says /content/exper...../button-invlaid.content.html to remove unnecessary content,

You can try to create an error container component with another experience fragment button-erorr.modal.json which can refer above experience fragment as a group and messages can be grouped and reused.   

Translate
Arun Patidar
aem_savyAuthor
Level 3
Mar 8, 2021 11:29 PM UTC
Thanks for that .
Translate
Kiran_Vedantam
New Participant
Mar 4, 2021 7:30 AM UTC

Hi @aem_savy,

 

For setting the values globally or site-specific, you can use context-aware-configuration functionality in AEM. With this, you create a page with wcm.io Context-Aware Configuration Editor template, author your values and access them across the site.

Refer:

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/context-aware-configs.html?lang=en#context-aware-configurations

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

Translate