How to restrict the custom button in Site Admin to a particular path ?

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

08-12-2020

Hi All

 

  This is a follow up question to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-add-a-custom-button... . I was able to create the button, but I want that button to be available only to a particular path under sites.html. Any idea ?

 

TIA

Veena

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

08-12-2020

Hi @Veena_Vikram,

We can make use of granite:rendercondition with resourceType being the servlet (registered with resourceType) where the path restriction can be handled by making use of custom properties set on rendercondition resource together with its respective logic in servlet.

Similar implementation is available in below blog post

http://aemlab.blogspot.com/2019/07/aem-granite-custom-render-conditions.html

 

Answers (0)