Plugin: tabs - set default

Other versions of this plugin may exist. Please ensure you are viewing the documentation for the version that you are currently using. If you are not running the latest version of your plugin we recommend upgrading. See: list of all available versions of this plugin.

Purpose

This plugin adds a configuration option that enables the specification of a default tab when using tabbed faceted navigation.

By default, when using tabbed faceted navigation the all results tab will be automatically selected if no tab parameter is supplied. This additional parameter enables the default tab to be changed to an alternate tab.

Usage

Enabling the plugin

Enable the tabs-set-default plugin on your results page from the Extensions screen in the administration dashboard or add the following results page configuration to enable the plugin.

plugin.tabs-set-default.enabled=true
plugin.tabs-set-default.version=1.0.0
The plugin will take effect as soon as it is enabled.

Plugin configuration options

The plugin requires that the tabs are set up using a facet of type tabbed and the facet must have a name of Tabs (case-sensitive).

The following options can be set in the results page configuration to configure the plugin:

  • plugin.tabs-set-default.config.default_label: The name/display value of the tab category that you wish to set as the default. This value is case-sensitive.

The above can be applied at either the search package or results page level. Any option that set at the search package level will be defined on all child results pages unless overridden.

Examples

Setting default tab for a category based one collection

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.

The following needs to be set on the results page to configure the tabs-set-default plugin:

plugin.tabs-set-default.enabled=true
plugin.tabs-set-default.version=1.0.0
plugin.tabs-set-default.config.default_label=Courses

All versions of tabs-set-default