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

Submissions are now open for the 2026 Adobe Experience Maker Awards.
解決済み

Is it Possible to set the path selected in searchRoot to be the rootPath of tagSelector

Avatar

Level 1
      <items jcr:primaryType="nt:unstructured">
                                            <searchRoot
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
                                                fieldDescription=""
                                                fieldLabel="Tag Path"
                                                name="./searchTagsPath"
                                                required="{Boolean}false"
                                                rootPath="/content/cq:tags"
                                                value="${not empty cqDesign.searchRoot ? cqDesign.searchRoot : ''}"/>
                                            <tagSelector
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="cq/gui/components/common/tagspicker"
                                                fieldDescription=""
                                                fieldLabel="Select Tags"
                                                name="./searchTags"
                                                required="{Boolean}false"
                                                rootPath=""
                                                value="${not empty cqDesign.searchRoot ? cqDesign.searchRoot : ''}"/>
                                        </items>
トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hi @VivekNa3 

 

Adding my thoughts here -

 

1. One way to achieve this is writing custom script and add the script in extraClientlibs in the dialog. Upon selection of searchRoot update tagSelector rootPath in the script.

2. Other way is changing the searchRoot as a dropdown field and select the pre-defined rootPaths from the list. Based on the selection hide/show the tagSelector rootPath using cq-dialog-show-hide property (No customization is needed in this case)

 

Hope this helps

 

Thanks

 

元の投稿で解決策を見る

2 返信

Avatar

正解者
Community Advisor

Hi @VivekNa3 

 

Adding my thoughts here -

 

1. One way to achieve this is writing custom script and add the script in extraClientlibs in the dialog. Upon selection of searchRoot update tagSelector rootPath in the script.

2. Other way is changing the searchRoot as a dropdown field and select the pre-defined rootPaths from the list. Based on the selection hide/show the tagSelector rootPath using cq-dialog-show-hide property (No customization is needed in this case)

 

Hope this helps

 

Thanks

 

Avatar

Community Advisor and Adobe Champion