Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Adding custom button for page templates

Avatar

Level 3

Hi Adobe Experts,

I would like to add some custom selection button to the page template AEM page at e.g. http://localhost:4502/libs/wcm/core/content/sites/templates.html/conf/wknd-spa-react 

Currently there are the buttons for edit, properties,...:
Screenshot 2024-03-19 at 18.09.08.png

I have removed all the buttons except the "open" first in my project's /ui.apps/src/main/content/jcr_root/apps/wcm/core/content/sites/templates/.content.xml configuration.
The changes are reflected in jcr:
Screenshot 2024-03-19 at 18.12.53.png

but all the selection actions are yet available in AEM when I open http://localhost:4502/libs/wcm/core/content/sites/templates.html/conf/wknd-spa-react .
Could not troubleshoot the issue, can you please help what I miss or how I can customize the buttons? 

P.S.: a similar approach is working for changing page / experience fragment selection actions.

Thanks,
Peter

1 Accepted Solution

Avatar

Correct answer by
Level 3

Ok, I had a bad understanding, removing the buttons from the overlayed content won't have an affect because the out-of-the-box content is yet there in the merged content. But adding a new button works.
So everything looking good.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 3

Ok, I had a bad understanding, removing the buttons from the overlayed content won't have an affect because the out-of-the-box content is yet there in the merged content. But adding a new button works.
So everything looking good.

Avatar

Community Advisor

Hi @pnagy , As the node which you are trying to update is a overlay node so if you remove something from the '/apps' folder it will inherit it from the '/libs'.

 

If you want to hide/remove the actions available, use Sling Resource Merger concept to hide resources which you dont want to display.

 

Example: If you want to display only 'open' action, please add below property under action node.

 

sling:hideChildren= ["viewproperties","enabletemplate","disabletemplate","publish","copy","deletetemplate"].

 

please refer more about sling resource merger here https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/dev...).