How to restrict the custom button in Site Admin to a particular path ? | Community
Skip to main content
VeenaVikraman
Community Advisor
Community Advisor
December 8, 2020
Solved

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

  • December 8, 2020
  • 1 reply
  • 1535 views

Hi All

 

  This is a follow up question to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-add-a-custom-button-on-siteadmin-in-aem-6-5/qaq-p/390099/comment-id/83429#M83429 . 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

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 Vijayalakshmi_S

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

 

1 reply

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
December 8, 2020

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

 

VeenaVikraman
Community Advisor
Community Advisor
December 9, 2020
Thanks @vijayalakshmi_s. I will check this.