-
Facets Reference
- Coveo Category Facet
- Coveo Date Facet Range
- Coveo Date Facet Slider
- Coveo Distance Facet Range
- Coveo Dynamic Date Facet Range
- Coveo Dynamic Distance Facet Range
- Coveo Dynamic Facet
- Coveo Dynamic Facet Manager
- Coveo Dynamic Hierarchical Facet
- Coveo Dynamic Numeric Facet Range
- Coveo Facet
- Coveo Numeric Facet Range
- Coveo Numeric Facet Slider
Coveo Dynamic Date Facet Range
Implements the Coveo JavaScript Search Framework DynamicFacetRange component to display a facet whose values are expressed as date ranges. The Coveo Dynamic Date Facet Range is an evolution over the Coveo Date Facet Range rendering, particularly because it implements Dynamic Navigation Experience.
The DynamicFacetRange extends the DynamicFacet component and supports most of its component options.
Usage Notes
-
The Sitecore date field which the facet is based on must be included for indexing in the Templates table of the Indexing Manager (see About the Indexing Manager - Fields).
-
To use the Coveo Dynamic Date Facet Range rendering with custom date ranges, create a content tree structure, such as the one below, containing a
Custom Date Ranges
item with childrenDate Range
items. This structure can be placed anywhere in the content tree. You will reference the location of theCustom Date Ranges
item in theFacet value ranges
data source option (see Configure Custom Ranges for a Date Range or Numeric Range Facet). -
To benefit from the automatic facet reordering functionality, group Coveo Dynamic Date Facet Range renderings and other dynamic facets (e.g., Coveo Dynamic Facet, Coveo Dynamic Hierarchical Facet) within a Coveo Dynamic Facet Manager. (see Use Dynamic Facets).
-
Coveo Dynamic Date Facet Range renderings may also be used as standalone facets without a Coveo Dynamic Facet Manager.
-
Any change to the facet range selection triggers a new Search API call.
Insertion Location
The Coveo Dynamic Date Facet Range rendering is an Allowed Control in the following placeholder(s): Dynamic Facets
, Facets
Example insertion sequence for the Coveo Dynamic Date Facet Range rendering.
When you add the Coveo Dynamic Facet Manager SXA rendering, this adds a coveouidynamicfacetssxa
placeholder. Insert your Coveo Dynamic Date Facet Range rendering in this coveouidynamicfacetssxa
placeholder.
Example insertion sequence for the Coveo Dynamic Date Facet Range rendering.
Data Source Options
Option name | Description |
---|---|
Title | See title component option |
Field | See field component option |
Facet name | See id component option |
Depends on | See dependsOn component option |
Enable collapse | See enableCollapse component option |
Facet collapsed by default | See collapsedByDefault component option |
Date format | The date format to use to display date values. Uses the Globalize JavaScript plugin format |
Enable search for the facet | See enableFacetSearch component option |
Scroll back to the top of the page on interaction | See enableScrollToTop component option |
Exclude folded result parents | The path to use as the path prefix for every query |
Notify the breadcrumb component | See includeInBreadcrumb component option |
Facet accuracy determined by the number of scanned results | Sets the injectionDepth component option to a preset value |
Prepend facet search queries with a wildcard | See useLeadingWildcardInFacetSearch component option |
Facet value ranges | Specifies whether to use automatically generated date ranges or custom date ranges created in Sitecore. |
DOM unique Id | Randomly generated HTML element id. |
Additional data attributes |
Allows use of the Coveo JavaScript Search Framework DynamicFacetRange component options that aren’t directly available in the data source. |
Sample Generated HTML and Corresponding Visual Output
<div id="_351D3A2A-0326-48CE-A9CA-43D6AF8AFBEA" class="CoveoDynamicFacetRange"
data-title="Date of Hiring" data-injection-depth="1000" data-prebind-field="fieldTranslator"
data-field="@datez32xofz32xhiring" data-ranges="[
{"start":"2005-01-01T05:00:00.000Z","end":"2010-01-01T04:59:00.000Z","endInclusive":true,"label":"2005 - 2009"},
{"start":"2010-01-01T05:00:00.000Z","end":"2015-01-01T04:59:00.000Z","endInclusive":true,"label":"2010 - 2014"},
{"start":"2015-01-01T05:00:00.000Z","end":"2020-01-01T04:59:00.000Z","endInclusive":false,"label":"2015 - 2019"}]"
data-value-format="date" data-applied-prebind="true">
