I need an error modal that works across the entire site. It will be triggered on different pages depending on different scenarios.
I wrote a component solely for the modal. Then I embedded the modal in another component. Here is my embed code:
<sly data-sly-resource="${'myPage-modal' @ resourceType= '/apps/store/components/content/modal',
decorationTagName='div', cssClassName='myPage-modal'}" />
I then dropped this modal onto the main language page. I configured there. It worked fine when I need to trigger the modal in the main page. However, when I need to trigger the model that has the custom class "myPage-modal", the modal is triggered, but the content of the modal is not there. When I checked the page source, I saw two modals there: one is the component that I dropped there and another one is embed one. The data is populated into the main component but not populated into the embed one. I am not sure how to make it work. Have I missed anything in my setup? Any help would be appreciated!