Expand my Community achievements bar.

SOLVED

To restrict the tags displayed in tagspredicate field in sites search facets [AEM6.5]

Avatar

Level 2

Hi,

 

I want to restrict the tags displayed in the tags predicate field.

 
 

tags.PNG

 

Initially I have overlayed the tag field from 

/libs/settings/cq/search/facets/sites/jcr:content/items/tags to /apps/settings/cq/search/facets/sites/jcr:content/items/tags and added namespaces property for whitelisting. But still it loads all the tags from /content/cq:tags. 

Need to change tagfiled functionality to access namespaces.
How to add namespaces functionality in cq/gui/components/coral/common/form/tagfield/render.jsp and how to update the cfg values? Can anyone help me on this?
 
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Abirami_SD,

Tagfield makes use of foundation-autocomplete where picker is configured as part of attribute named pickersrc.

Value of pickersrc being - /mnt/overlay/cq/gui/content/coral/common/form/tagfield/picker.html?root=%2fcontent%2fcq%3atags&selectionCount=multiple where root and selectionCount is dynamic and can be set using properties on resource where tagfield is used

  • root is set with value from property named rootPath
  • selectionCount is set with value from boolean property multiple

For tagfield within search facets, per the logic written in /libs/cq/gui/components/coral/common/admin/customsearch/searchpredicates/tagspredicate/tagspredicate.jsp(resource used in below tags node via sling:resourceType), we can either use rootPath or tagsPath to set the tags root on the resource - /libs/settings/cq/search/facets/sites/jcr:content/items/tags

You can overlay and amend accordingly

Screenshot for reference:

Vijayalakshmi_S_0-1601387707213.png

Vijayalakshmi_S_1-1601387819871.png

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Abirami_SD,

Tagfield makes use of foundation-autocomplete where picker is configured as part of attribute named pickersrc.

Value of pickersrc being - /mnt/overlay/cq/gui/content/coral/common/form/tagfield/picker.html?root=%2fcontent%2fcq%3atags&selectionCount=multiple where root and selectionCount is dynamic and can be set using properties on resource where tagfield is used

  • root is set with value from property named rootPath
  • selectionCount is set with value from boolean property multiple

For tagfield within search facets, per the logic written in /libs/cq/gui/components/coral/common/admin/customsearch/searchpredicates/tagspredicate/tagspredicate.jsp(resource used in below tags node via sling:resourceType), we can either use rootPath or tagsPath to set the tags root on the resource - /libs/settings/cq/search/facets/sites/jcr:content/items/tags

You can overlay and amend accordingly

Screenshot for reference:

Vijayalakshmi_S_0-1601387707213.png

Vijayalakshmi_S_1-1601387819871.png