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
-
Select Plugins from the side navigation pane and click on the Tabs - set default tile.
-
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 |
|
Data type |
string |
Default value |
|
Required |
This setting is required |
Defines the tabs faceted navigation name
Default tab to select
Configuration key |
|
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
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
andexample~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 theexample~websites
data source. -
Courses
which returns documents from theexample~courses
data source. -
Events
which returns documents from theexample~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 |