コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

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 受け入れられたソリューション

Avatar

正解者
Level 10

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

 

元の投稿で解決策を見る

4 返信

Avatar

正解者
Level 10

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 @Vijayalakshmi_S. I will check this.

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.