The filter bar in use: a row of tabs made of two combined filters, a Sort by menu, and a Filter menu holding the filters that are not combined.
The Views UI: the Combined filters form - which filters to combine, the widget, where the row goes - and the Combined sorts form beside it.
A second walkthrough of the two settings forms and the preview, where the row of filters and the row of sorts are printed one under the other.

This project is not covered by Drupal’s security advisory policy.

Combined Exposed Filters turns several exposed filters of a View display into one widget: a single row of options - every option of every filter it combines - where one is in force at a time. It is the module for the tab row a listing page is led by ("All / Regulations / Circulars / Guides"), including the case the usual tab modules do not reach: a row whose options come from more than one filter.

Features

  • One row out of several filters. Two vocabularies, a vocabulary and a content type, a list field and a checkbox - they read as one sequence.
  • Every option is a link. The row works without JavaScript, survives being bookmarked and shared, and is cached like any other page of the view.
  • Exposed sorts as well, joining the filters in one row or standing as a row of their own - above it, below it, or beside it.
  • Five widgets: Tabs, Drop-down menu, Select list, Autocomplete and Links. Each is a plugin with a template of its own, so a theme overrides one or a site adds another.
  • The whole exposed form as a filter bar, where a display asks for one: a search box, a "Sort by" menu, a "Filter" menu holding every filter that is not combined, and the combined row beneath them. One layout for whatever the display exposes, so a filter added in the Views UI finds its place without a line of theme code.
  • Option labels per display, so a visitor reads "Newest" rather than "Authored on, Desc".
  • Settings live on the display, as a Views display extender, and are exported with the view like every other Views setting.

Post-Installation

There is no settings page. Expose the filters and sorts the row should be made of, then open Advanced > Exposed form, where two rows stand beside the usual ones: Combined filters and Combined sorts. Tick what to combine, pick a widget, and name the options as they should read.

Views does not inherit display extenders from the Default display, so set this on the display that is actually shown - the page or the block - and not on Default.

The README that ships with the module documents every setting, the filter bar and the templates a theme may override.

Theming

The look in the screenshots above is the theme of the site they were taken on, not this module's. What the module brings is the structure and the markup: the row, the bar, each menu and each option are printed by a template of their own. A theme takes one over by copying it into its own folder - one template per section, so the tab row, the "Sort by" menu, the "Filter" menu, a single option and the bar itself are dressed separately, and whatever is not copied keeps the markup the module ships. Both settings forms list the template names for the row as it stands, under "Templates", so there is no guessing at file names.

Additional Requirements

Views, in Drupal core. No libraries and no contributed dependencies.

This module is sponsored and developed by SharedTech

SharedTech

Supporting organizations: 

Project information

Releases