Data Source Branch Templates
Data Source Branch Templates
Legacy feature
This article pertains to the Coveo Hive framework which is now in maintenance mode. Choose one of Coveo’s more modern, lightweight, and responsive libraries for any future search interface development. See the search interface Implementation guide for more details. |
A Coveo Hive search interface typically contains many renderings. Moreover, you might need to build a few search interfaces and include a global searchbox in your web site page header. Given that most Coveo for Sitecore renderings require a data source, your total number of data sources could be significant. Without proper measures, tracking your data sources can become an issue.
On another note, some of your renderings need unique configurations. Conversely, you might want several renderings of a same type to have identical settings.
With all this in mind, Coveo for Sitecore ships with two branch templates which provide out-of-the-box folder structures that let you store your Coveo rendering data sources by rendering type:
-
The Coveo Local Parameters Folder
Use this template for page-specific rendering data sources (for example, a specific search page, a listing page, or a page with a global searchbox). A Coveo Local Parameters Folder should be inserted under the page item it configures.
-
The Coveo Global Parameters Folder
Use this template to store data sources for Coveo renderings that share identical settings. A Coveo Global Parameters Folder should be inserted in a high-level folder, such as the
Global
folder in the example below.
To insert a Coveo Local or Global Parameters Folder in your Sitecore content tree
-
In the Sitecore Content Editor, right-click the content tree item under which you want to add your parameters folder, and select Insert > Insert from template.
-
In the Insert from Template window, select Branches > Coveo Hive.
-
Select Coveo Local Parameters Folder or Coveo Global Parameters Folder.
-
In the Item Name field, provide a meaningful name for your folder.
-
Click Insert.
Coveo Rendering Data Source Locations
Coveo Hive
Coveo for Sitecore view rendering items contain a Datasource Location
field. For renderings that require a data source, this field comes populated with an xPath query which determines the suggested storage locations for your rendering data source. The suggested data source storage locations for a given Coveo Hive rendering are:
- any child folder of the context item
-
any Coveo Global Parameters Folder of the relevant rendering type
- any Coveo Local Parameters Folder of the relevant rendering type that’s a child of the context item
You have the following folder structure in your Sitecore content tree.
You open your MainSearchPage
item in the Experience Editor. You select the Coveo Search Interface rendering and select the Add associated content option in the toolbar. Sitecore suggests the following locations for your Coveo Search Interface data source:
Coveo Hive SXA
Coveo for Sitecore view rendering items contain a Datasource Location
field. For renderings that require a data source, this field comes populated with an xPath query which determines the suggested storage locations for your rendering data source. The suggested data source storage locations for a given SXA rendering are:
- any Coveo Global Parameters Folder of the relevant rendering type
-
the context item
Data
child folder and all its subfolders - any Coveo Local Parameters Folder of the relevant rendering type that’s a child of the context item
You have the following folder structure in your Sitecore content tree.
You open your CoveoSearchSXA
item in the Experience Editor. You select the Coveo Search Interface rendering and select the Add associated content option in the toolbar. Sitecore suggests the following locations for your Coveo Search Interface data source: