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

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,049 posts

Correct reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,049 posts

Correct reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
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

View Entire Topic

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

573 likes

Total Posts

728 posts

Correct reply

240 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

573 likes

Total Posts

728 posts

Correct reply

240 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
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