Search Widget Component
The 'Search' and 'Search Widget' components as a pair provides your users the ability to search through your AEM site conveniently.
Note: AEM Search will not search content that is external to AEM. You may need to insert a Google search in this case.
When should you use the Search Widget component?
Use the Search Widget component on any pages in your AEM site where you want your readers to be able to search through specific information (e.g., search news stories sorted by year, search for staff members in a faculty directory folder)
Note: You should not use the Search Componentto allow your visitors to search your entire site. In the new Common Look & Feel (CLF), a site-specific search box is included automatically on the top-right corner of every page for that purpose.
Implementing the Search Widget
The following are the two phases of putting a search widget on your site. We recommend that you set up your search page first.
Setting up your search page
- In the WCM, create a new page called 'Search' — this is where the search results will be displayed. It can be any template.
- On this Search page, drag in a 'Search' component.
- Double-click the component and click the magnifying glass beside the 'Path to search field'.
- Navigate to the page of your site that you wish to provide a search function to for your visitors.
Deploying the Search Widget Component
- In a content page, drag in a Search Widget component.
- Double-click the component. Optionally, here you can give it a Title (which may say something like "Search Faculty members within [department]" or ask "What would you like to search for?"), modify the search button text, etc.
- In the Search Path field, navigate to the Search page you created. This is the page that the search results will be displayed.