Pass Non-Fronted JavaScript Framework Properties to Hive Components

Coveo for Sitecore 5 (February 2019)

Coveo for Sitecore Hive Framework renderings wrap Coveo JavaScript Search Framework components in Sitecore renderings. Editing Coveo for Sitecore rendering data source items allows you to leverage many, but not all, Coveo JavaScript Search Framework component options.

The February 2019 version of Coveo for Sitecore added a new rendering data source feature called Additional Data Attributes on many Coveo for Sitecore Hive components. This feature makes it simple to use the entire set of options on the related Coveo JavaScript Search Framework component without having to create all the resources associated with a Coveo for Sitecore Hive component (see Integrate a Custom Component in Sitecore using Coveo for Sitecore Hive Framework).

With this new feature, you can set any Coveo JavaScript Search Framework component option on its related Coveo for Sitecore Hive component by specifying key-value pairings in the Coveo for Sitecore rendering data source (see Coveo JavaScript Search Framework - Reference Documentation).

You have added several tabs in your Coveo for Sitecore search interface. The default sorting order of the search results is set to relevancy. However, when a specific tab in your search interface is selected, you would like the search results to be sorted in date descending order, using the Coveo JavaScript Search Framework tab component sort option (see Tab Component - Sort).

To set the sorting order of search results for a specific tab

  1. In the Experience Editor, select the tab component to set the sort order on.
  2. On the floating toolbar, click the Edit the rendering's data source button.
  3. Scroll to the Attributes section.
  4. Under Additional Data Field, specify the name of the Coveo JavaScript Search Framework component option in the key field and the required parameter value.

  5. Save and publish your changes.
  • The Additional Data Attributes feature allows many key-value pairs to be configured on the data source.

  • Use camel case notation for multi-word Coveo JavaScript Search Framework attributes. For example, type tabNot in the Additional Data Attributes key field to reference the data-tab-not Coveo JavaScript Search Framework attribute.

What's Next for Me?