Legacy Search UI Framework
- Inserting and Customizing a Search Interface Component
- Inserting Coveo Search Components to an Existing Item
- Inserting and Customizing a Facet Component
- Inserting and Customizing a Sort Component
- Inserting and Customizing a Tab Component
- Inserting and Customizing a Related Query Component
- Inserting and Customizing a Recommendations Component
- Inserting and Customizing a User Context Component
- Ranking and Filtering Rules
- Inserting and Customizing a Distance Resources Component
- Creating a Search Driven Page
- Duplicating the Coveo Search Component
- Inserting a Coveo Search Box to Your Header
- Autocomplete and Suggestions
- Adding a Field to a Result Template
- Adding Images to Your Search Page
- Customizing a Search Interface
- List of Available Components
- List of Available Parameters
- Relating Coveo for Sitecore Components to Sitecore Templates, Layouts, and Sublayouts
- Digging Into the Layouts and Components Code
- Creating a Custom Component Parameters
- Inserting Custom Component Parameters
- Creating a Search Interface Optimized for Mobile Devices
- Creating a Search Interface Optimized for WebCrawlers
- Understanding How MVC Components Work Behind the Scenes
- Modifying or Removing the Insert Option for the Coveo Search Page
Inserting and Customizing a Related Query Component Using the Coveo for Sitecore Legacy Search UI Framework
The Related Query component is used to execute a query using its own filters, parameters, and modifiers and present its results next to the search results list.
Inserting the Related Query Component in a Search Interface
- In the Content Editor, select your search page, and under the Publish tab, select the Experience Editor.
- Locate the
coveo-recommendationsplaceholder in the right section of the search interface.
Insert a Coveo Related Query component at the identified location by clicking the Add here label.
- In the Select a Rendering dialog box, select Coveo Related Query, and then click Select.
- In the Control Properties dialog box, enter your desired properties. Here are some of the properties you might want to change.
- Title: the name displayed for your tab.
- Bind to search interface: whether the component should be refreshed when a new query is done.
- Use the search interface current filters: whether the component should take the facet and tab filters into account. For this to work, Bind to search interface must be checked.
- Use the search interface current query: whether the visitor’s current query should be taken into account. For this to work, Bind to search interface must be checked.
- Under Paging: Number of results per page: Specifies the number of results to display. The default value is
For Enterprise clients, under Results scope, consider changing the Filter and Boosting expressions rules (see Adding Boosting or Filtering Expressions).
For Free and Pro edition clients, see Using Boosting or Filtering Rules on the Tab Component Programmatically.
- Save the Control Properties dialog box by clicking on OK.
- Save your page.
- Validate that the related content appears in your search interface.
In your bookstore’s website, you want to have a related query component that presents authors related to the visitor’s current search.
You title the component Related Authors.
Because you want your Related Authors section to update with your visitor’s query, you decide to check the Bind to search interface and the Use the search interface current query, boxes in the Component Properties.
You also limit the items only to your items under the Authors item, by adding the rule
where the item is the Authors item or one of its subitems under Results scope.
You save the page, and test your component by typing
science fiction in the result box. You see that the component is updated with the query.
Inserting the Related Query Component in an Existing Page
It is also possible to use the Related Query component directly on a page, without the Search Interface
- Insert the Coveo Search Resources component (see Inserting Coveo Search Components to an Existing Item).
- In the Sitecore Content Editor, select your item, and under the Publish tab, select the Experience Editor.
Insert the component in your page.
In the area where you placed your placeholder, select Add here.
You might want to consider clicking the Add a new component button at the top of the page, next to the Save button.
In the Select a Rendering dialog box, choose Coveo Recommendations, and click Select.
In the Control Properties dialog box, enter your desired properties.
Configure the properties as noted above (see step 5 in Inserting the Related Query Component in a Search Interface).
In this scenario, you should never check the
Bind to search interfaceoption.
- Save your page.
Validate that the component works as expected.
To learn more about the various properties of the Related Query component, see Related Query Component Properties.