To restrict the tags displayed in tagspredicate field in sites search facets [AEM6.5] | Community
Skip to main content
Level 2
September 29, 2020
Solved

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

  • September 29, 2020
  • 1 reply
  • 1071 views

Hi,

 

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

 
 

 

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?
 
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 @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:

1 reply

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
September 29, 2020

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: