Preferences Panel component

This is for:

Developer

3215-preferences-panel

The PreferencesPanel component allows users to specify customization options in the current search interface. These customization options are then saved in the browser local storage.

The PreferencesPanel component appears as an option of the Settings menu Settings when a Settings component is initialized.

Preferences-Button

Adding the Preferences Panel component to a search interface

Find the <div class="coveoSettings"> section, and then add the following code to the section:

<div class="CoveoPreferencesPanel"></div>

The <div class="coveo-search-section"> section should now look like this:

<div class="coveo-search-section">
  <div class="CoveoSearchbox" data-enable-omnibox="true"></div>
  <div class="CoveoSettings"><div class="CoveoPreferencesPanel"></div></div>
</div>

Adding the Preferences Panel without referencing the ResultsPreferences or ResultFiltersPreferences component renders an empty Preferences panel.

Reference

The options available in the Preferences panel are the following:

Always Open Results in New Window

Check this box to open search results in a new browser tab. When this box isn’t checked, a search result that you click opens in the current browser tab, replacing the search interface.

To enable the "Always open results in a new window" option

Find the <div class="coveoSettings"> section, and then add the ResultsPreferences component by adding the following code to the section:

<div class="CoveoResultsPreferences"></div>

The <div class="coveo-search-section"> section should now look like this:

<div class="coveo-search-section">
  <div class="CoveoSearchbox" data-enable-omnibox="true"></div>
  <div class="CoveoSettings"><div class="CoveoPreferencesPanel"><div class="CoveoResultsPreferences"></div></div></div>
</div>

Result Filtering Expressions

The result filtering expressions you create permanently refine the search results, so that you don’t need to reselect the same facets every time you open the Content Browser (platform-ca | platform-eu | platform-au) .

You can enter any query expression that you would use in a search box. See Query Syntax Reference for details.

To create a new filter:

  1. Click Create.

  2. Under Caption, enter a filter name.

  3. Under Expression, enter the desired filter expression.

  4. If applicable, in the Tab box, select the tab on which the filter should apply.

  5. Click the check mark on the right to save your filter.

You always only want to look at search results from year 2014 or later.

Creating a result filtering expression

To enable the "Results filtering expressions" option

Find the <div class="coveoSettings"> section, and then add the ResultsFiltersPreferences component by adding the following code to the section:

<div class="CoveoResultsFiltersPreferences"></div>

The <div class="coveo-search-section"> section should now look like this:

<div class="coveo-search-section">
  <div class="CoveoSearchbox" data-enable-omnibox="true"></div>
  <div class="CoveoSettings"><div class="CoveoPreferencesPanel"><div class="CoveoResultsFiltersPreferences"></div></div></div>
</div>