April 7, 2020
Estimated Post Reading Time ~

Admin Search Panel Customization



With AEM 6.2, Adobe has introduced ‘OmniSearch’ which is very useful for the authors to search for anything from the repository. This OmniSearch is a full-text predicate based which drives the results from its smart tag. So Authors can pretty much search for anything they want from OmniSearch for the ‘Sites’
omnisearch

Whereas in Classic UI of AEM 5.x, Authors will have a ‘Site Search’ in /siteadmin where they have multiple options like full text, Date Modified, Template and Tags to find the right content or page. Let us understand where exactly the options for this search is coming from and how can we customize the same.
searchpanel

/libs
All the columns and the actions for the search panel are located at /libs/wcm/core/content/siteadmin/tabs/searchpanel.
All the facet options for the Search are located at /libs/wcm/core/content/search/searchpanel/facets

UseCase
Enable my project tags to be available as an option in ‘Tags’.
Most of the time, we would have defined a set of Tags for our site and we would like to enable the same for the Authors so that they can filter their search based on those tags. Let us see how can we achieve the same

Solution
For solving the same, let us consider ‘geometrixx-media’ as our site. All the tags for this site are located at /etc/tags/geometrixx-media
Step1:
Copy the node /libs/wcm/core/content/search/searchpanel/facets under /apps
overlay
Goto the node ‘tagoptions’ and add /etc/tags/geometrixx-media for the property ‘OptionsPaths’

tagoptions
Save the changes and refresh siteadmin.
Now you should be able to see the ‘geometrix-media’ tags in the search options.
siteadmin

Note: Always remember not to change or customize anything under /libs.  Copy the node where you want to customize under /apps and make the changes. Package it with your project and deploy it in the environments.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.