Adding custom button for page templates | Community
Skip to main content
Level 3
March 19, 2024
Solved

Adding custom button for page templates

  • March 19, 2024
  • 2 replies
  • 878 views

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,...:


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:


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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by pnagy

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.

2 replies

pnagyAuthorAccepted solution
Level 3
March 20, 2024

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.

sravs
Community Advisor
Community Advisor
March 21, 2024

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/developing/full-stack/sling-resource-merger#:~:text=With%20the%20Sling%20Resource%20Merger,it%20overlays%20or%20overrides%20it).