- Creating and Making Use of a New Result Template
- Editing the Content of a Result Template
- Creating a Simple Listing Page
- Applying Filtering and Ranking Rules
- Routing Search Queries to Query Pipelines
- Inserting and Configuring a Global Search Box
- Inserting and Customizing a Distance Resources Component
- Configuring Custom Ranges for a Date Range or Numeric Range Facet
- Inserting Custom Components in an Existing Search Interface
- Integrate the Search Interface in an Existing Page
- Translating Fields to the Coveo Format
- Overriding Coveo for Sitecore Hive Initialization Options
- Creating a Custom Hive Component - Multi-Sort Tutorial
Inserting and Customizing a Distance Resources Component
The Coveo Hive Framework offers a set of renderings to use this component in a Coveo for Sitecore scenario.
To be able to use geolocation components and rules, you must first add the
Distance Resources Hive Rendering to the page. This rendering calculates the distance between each item and the user.
Configuring the Distance Resources data-source
Before inserting the distance resource component, you need to configure its data-source component.
- In the Sitecore Content Editor, use the insert option on the (Global/Local) Resources folder to insert a Distance Resources data-source.
If you do not have a data-source folder yet, see Step 1 - Branching the Data Sources of the Hive tutorial.
- In the Basic Settings section, fill out the following fields:
- Latitude Field:The name of the field to use as the latitude for the distance query.
Longitude Field:The name of the field to use as the longitude for the distance query.
Units: The units to use for to calculate the distance.
For more information about any of the fields above, see the Distance Resources Component.
Depending on your needs, you may also want to change the value of the Distance Field Name,which represents the name of the field where the distance is stored on each item.
- Save the item.
Inserting a Distance Resources Component in a Search Page
Access the Experience Editor of the Coveo search page you want to edit.
- Locate the
Click Add here to insert a
In the Select a Rendering dialog, click the Distance Resources icon and then click Select.
- Link it to the previously created Distance Resources data-source.
- The page will load for a few seconds before the component and a Distance Placeholder appears on the page.
- Click on the Distance Placeholder.
- In the Select a Rendering dialog, click the icon of your preferred provider and then click Select.
- Save your page.
Once you have the resources in place, you can leverage it in these related renderings:
Distance Facet Slider
Distance Facet Range