0
votes

so I am currently working on AEM 6.1 and I have been assigned a task to display a popup/alert message immediately when I land on the DAM. This alert should just contain a message with a few guidelines.

I would like to know how I would access that DOM from my project. I tried using a clientlib category "cq.authoring.dialog", but i take it this particular category only works when authoring, so I would like to perform the action immediately when author clicks on Assets

1

1 Answers

1
votes

If you have to customize any default behavior in AEM, you can overlay the library component responsible for that function.

You have to start off by finding the library component responsible for the behavior - in your case, the component responsible for rendering the http://<host>:<port>/assets.html/content/dam page. Few ways to find out the component is by analysing the DOM for any unique attributes, analyzing the network logs, etc and tracing it all back to one of the components in /libs.

Components responsible for DAM are located in /libs/dam/gui/components/.

/libs/dam/gui/components/admin/page/contentchecker/contentchecker.jsp for example gets invoked when you open DAM console. You overlay this node to create a node tree inside /apps and you can then write your custom alert code in the overlayed file.

This is just one of the components which gets called when you open DAM. If you dig deeper you'll be able to find a lot more components you can use to overlay and write custom code.

Read more about overlay here.

Note: Ensure you version control the overlayed node and make entries in filter.xml - to ensure this gets deployed to all the environments along with the rest of the source code.

Screenshot of Overlayed file and node tree in /apps -

Overlayed Node

Alert