Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

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

Avatar

Community Advisor

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @VeenaVikraman,

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

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hi @VeenaVikraman,

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

 

Avatar

Community Advisor
Thanks a lot @Vijayalakshmi_S . It works like magic @arunpatidar you are awesome Thanks for the blog

Avatar

Community Advisor
@arunpatidar This works fine, but when I navigate to other content tree, it still remains hidden unless I refresh the page.