Plugin: Tabs - set default

Purpose

Use this plugin when you are using tab facets and need to specify a default tab to select.

When using tabbed faceted navigation, the default behavior is to automatically select the all results tab if no other tab is select. This plugin provides an additional option allowing you to change this default.

Usage

Enable the plugin

  1. Select Plugins from the side navigation pane and click on the Tabs - set default tile.

  2. From the Location section, select the results page to which you would like to enable this plugin from the Select a results page select list.

The plugin will take effect as soon as you finish running through the plugin setup steps.

Configuration settings

The configuration settings section is where you do most of the configuration for your plugin. The settings enable you to control how the plugin behaves.

The configuration key names below are only used if you are configuring this plugin manually. The configuration keys are set in the results page configuration to configure the plugin. When setting the keys manually you need to type in (or copy and paste) the key name and value.

Tabs facet name

Configuration key

plugin.tabs-set-default.config.tabs_facet_name

Data type

string

Default value

Tabs

Required

This setting is required

Defines the tabs faceted navigation name

Default tab to select

Configuration key

plugin.tabs-set-default.config.default_label

Data type

string

Required

This setting is required

Defines the name of the tab (case-sensitive) that you wish to select when no other tab selections have been made.

If the tabs value is sourced from a metadata, please input the metadata class name

Is tabs value sourced from metadata?

Configuration key

plugin.tabs-set-default.config.is_default_label_metadata_field

Data type

boolean

Default value

false

Required

This setting is required

Select true if the tabs value is sourced from a metadata field

Metadata field name

Configuration key

plugin.tabs-set-default.config.default_label_metadata_class

Data type

string

Required

This setting is required

Only required if the tabs value is sourced from metadata field

Examples

Change the default selected tab

Example 1

In this example, the courses tab will be automatically selected if no other tabs have been previously selected.

Given:

  • A search package with 3 data sources; example~websites, example~courses and example~events-web.

  • A tabbed facet has been configured with the following categories:

    • All results which returns documents from all data sources.

    • Websites which returns documents from the example~websites data source.

    • Courses which returns documents from the example~courses data source.

    • Events which returns documents from the example~events data source.

Configure the plugin as follows to select the courses tab when no other tabs have been selected:

Configuration key name Value

Tabs facet name

Tabs

Default tab to select

Courses

Is default label metadata field?

false

Example 2

In this example, the english tab will be automatically selected in no other tabs have been previously selected

Given:

  • A search package

  • A tabbed facet has been configured with the following:

    • Name: Languages

    • Category sources: Facets based on metadata

      • metadata class - language

Configure the plugin as follows to select the english tab when no other tabs have been selected:

Configuration key name Value

Tabs facet name

Languages

Default tab to select

english

Is default label metadata field?

true

Metadata field name

language

By default, Funnelback will lowercase the values of metadata fields. To change this behaviour, please refer to Faceted navigation - capitalizing the category names

Change log

[1.2.0]

Added

  • Added configuration to set tabs sourced from a metadata field

  • Made tabs facet name configurable with default value Tabs

[1.1.0]

Changed

  • Updated to the latest version plugin framework (Funnelback shared v16.20) to enable integration with the new plugin management dashboard.