Plugin: tabs-remove-parameters

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.

This plugin provides the ability to remove parameters such as sort and num_ranks when navigating between tabs. This is useful in the scenario where retaining the user’s selection is not desirable.

For example, by default, the product behaves in the following manner:

Given

  • A search implementation with a primary tab which has two categories; Courses and events.

  • The courses tab is selected.

  • Results are ordered by title.

When

  • A user changes from courses to events.

Then

  • The events tab is selected and the results are sorted by title.

This plugin will change the behaviour so that the above will be:

  • The events tab is selected and the results are sorted by relevancy (which is the default sort).

Prerequisite

The plugin expects that tabs are set up using a Tabbed facet which is named "Tabs" (case-sensitive).

Configuration

The following parameter keys need to be added to the results page to enable the plugin.

plugin.tabs-remove-parameters.enabled=true
plugin.tabs-remove-parameters.version=1.0.0

The following parameter keys can be used to configure the plugin:

  • plugin.tabs-remove-parameters.config.remove_parameters: Determines which url parameters should be removed when navigating from a tab with browse mode enabled to another tab. Accepts a comma separated list of strings.

Example

Remove the sort parameter when navigating from tab to tab.

plugin.tabs-remove-parameters.config.remove_parameters=sort

Remove the num_ranks and fmo parameters when navigating from tab to tab.

plugin.tabs-remove-parameters.config.remove_parameters=num_ranks,fmo

All versions of tabs-remove-parameters