Suppose In my DAM I have two folder /content/dam/us/en and /content/dam/us/de I want to create option filter predicate for /content/dam/us/en which should not reflect on /content/dam/us/de DAM asset path
Question
1. Can we add filter predicate for just /content/dam/us/en dam path?
2. Can we add filter different for /content/dam/us/en and /content/dam/us/de which should not reflect in one another?
Views
Replies
Total Likes
Hello @Ronnie09
We do not seem to have a conditional show/hide option via Serach Forms UI.
Can you please try using renderconditions? Append them via CRXDE.
Caution: The render conditions might be deleted, if someone edits the Serach Form from UI
Hi @aanchal-sikka
Do you have any sample how can I workout via renderconditions?
{
"jcr:primaryType": "nt:unstructured",
"listOrder": "101",
"metaType": "tags",
"fieldLabel": "Tags 1",
"sling:resourceType": "cq/gui/components/coral/common/admin/customsearch/searchpredicates/tagspredicate",
"granite:rendercondition": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "granite/ui/components/foundation/renderconditions/and",
"dms7feature": {
"jcr:primaryType": "nt:unstructured",
"expression": "${!granite:containsIgnoreCase(header['Referer'], 'library')}",
"sling:resourceType": "granite/ui/components/coral/foundation/renderconditions/simple"
}
}
}
Please try above config
I have tried on Tabs predicate, the filter is not displayed, but its title is available.
The condition checks if the request is made from a folder that have 'library' in it.
When search is done from a folder, the request for filter section has Referer like :
I have created new option predicate filter ECO I don't want to show to /content/dam/us/en and other site only visible to /content/dam/us/de. This is also achievable via render condition? I am ok to do via crx/de
I tried adding simple render condition but not working
@aanchal-sikka
It is not working
As Stated I have added same but for me Header Referer is different. I am using AEM Cloud
Below is the change as suggested by you
The Referer without FOlder path is created when we refresh the search page.
However, if you go to a Folder and then click filter, the folder info is present in Referer.
I hope the ! (NOT) operator in the expression can help achieve the default and the folder specific behaviour
@aanchal-sikka
Got it ... It is working for tag Predicate but not option predicate
Style - TAG PREDICATE
Eco - OPTION PREDICATE
@aanchal-sikka
Thanks for the config
I tried on OOTB created Option Predicate for those as well it is not working.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies