Set up the Interface
- Understanding the Search Hub
- Integrate a Hosted Search Page in a Sitecore Item
- Insert an Example Search Page
- Data Source Branch Templates
- Search Page Structure
- Add and Preview the Search Resources
- Use SXA Components in the Experience Editor
- Add Basic Controls
- Insert and Configure a Global Search Box
Integrate a Hosted Search Page in a Sitecore Item
If you have created a hosted search page in the Coveo Administration Console, you can integrate that search page in your Sitecore website seamlessly by inserting the Coveo Hosted Search Page rendering in a Sitecore item. Once the Sitecore item web page is loaded, the Coveo Hosted Search Page component is initialized, at which time the content of the target Coveo Platform search page is fetched and injected into the page layout.
Coveo for Sitecore further eases the implementation process by providing an Example Hosted Search Page branch template that bundles a Sitecore item linked to a layout which already contains the Coveo Hosted Search Page rendering, and the rendering data source. This branch template may be used in a standard Sitecore site or in an SXA site.
Creating a search page item using the
Example Hosted Search Page branch template
In the Content Editor, right-click the parent of the new search page item and select Insert > Insert from template.
Branches/Coveo Hive/folder, select the Example Hosted Search Page template and give your new item a name.
In the content tree, select the Example Hosted Search Page data source item.
If you’re getting an error in the
Search Pagefield, see Required API Key Privileges.
Select the Coveo organization search page you want to use from the
Search PageDroplist and set a
Always specify custom
Search Hubvalues in your search interfaces (see Understanding the Search Hub).
You can now browse your new hosted search page item in the Experience Editor or in Preview mode. If your Coveo Platform search page does not appear, see Required API Key Privileges.
Required API Key Privileges
Within Sitecore, calls to the Coveo Platform are performed to get the list of your organization search pages and to fetch the code of the selected search page.
In your Coveo organization, for the Configuration API key, the Edit access right on the Search pages domain is required for the
Search Pagedata source Droplist to be populated.
In your Coveo organization, for the Search API key, the Edit access right on the Search pages domain is required for the Coveo Platform search page code to be retrieved.
Editing a Coveo Platform Search Page Versus Creating Search Pages in Sitecore Items
The alternative method is to create search pages from the ground up in Sitecore, using Coveo for Sitecore renderings. This approach lets you use
Sitecore-specific renderings included in the Coveo for Sitecore Hive Framework.
Coveo developers added most Sitecore-specific renderings to take advantage of Sitecore features and context information. These renderings can significantly increase the functionality of search pages and the relevance of search page results.
For instance, the renderings in the Scopes section of the Coveo Hive Renderings Reference Documentation provide useful filtering and boosting functionalities. With a Coveo organization search page, you can achieve similar results by setting up query pipelines (see Manage Query Pipelines).