Views Exposed Filters Summary
Displays a summary of selected exposed filters in the Views header or footer area, allowing users to see and remove active filters.
views_filters_summary
Install
composer require 'drupal/views_filters_summary:^3.3'
Overview
Views Exposed Filters Summary is a Views area plugin that provides a clear visual representation of which exposed filters the user has selected. The summary can be displayed in the header or footer area of any View and includes the filter names and their selected values.
The module is highly configurable, allowing administrators to control which filters appear in the summary, how they are formatted, and whether to show individual remove links or a global reset link. It supports various filter types including taxonomy terms, entity bundles, list fields, boolean filters, user names, and date ranges with proper operator handling (equals, not equals, between, greater than, less than, contains, etc.).
The module includes comprehensive JavaScript functionality that works with both AJAX-enabled and standard Views, ensuring that when users remove individual filters or reset all filters, the View updates appropriately. Multiple submodules provide integration with popular contributed modules like Better Exposed Filters, Search API, Entity Browser, Address, and Commerce.
Features
- Displays exposed filter summary in View header or footer areas showing which filters are currently active
- Provides individual filter removal with 'X' button that clears specific filter values and refreshes the View
- Includes a reset link option to clear all active filters at once
- Configurable filter selection - choose which exposed filters to include in the summary
- Optional filter labels display alongside values for clearer context
- Groups multi-value filters under a single label to reduce visual clutter
- Customizable separator between filter items (comma, pipe, etc.)
- Customizable prefix text before the filter summary (e.g., 'Filtering by:')
- Singular and plural result labels for proper grammar (e.g., '1 result' vs '5 results')
- Fully customizable content format with replacement tokens including @total, @result_label, @exposed_filter_summary
- Supports operator-aware display (shows 'Not equal to', 'Contains', 'Greater than', etc.)
- Works with AJAX-enabled Views for seamless filter updates without page reload
- Works with standard non-AJAX Views using history state manipulation
- Translates taxonomy term names to current user's language in multilingual sites
- Comprehensive hook system for extending and customizing filter display behavior
- Eleven submodules for integration with popular contributed modules
Use Cases
Product Catalog with Multiple Filters
On an e-commerce site with product views filtered by category, price range, brand, and availability, display a summary like 'Showing 42 products for Category: Electronics, Price: $100-$500, Brand: Sony' with X buttons to remove individual filters and a Reset link to clear all.
Content Administration Dashboard
In a content management view with filters for content type, author, status, and date range, display active filters in the header so administrators can quickly see which content subset they're viewing and easily modify their selection.
Search Results Page with Faceted Navigation
When using Search API with faceted filters, display the active facet selections (taxonomy terms, content types, date ranges) in a summary bar above results, allowing users to see and remove individual facets without scrolling to the sidebar.
User Directory with Accessible Filters
For a user directory filtered by role, department, and location, use the A11y submodule to provide screen reader-friendly filter removal with proper ARIA labels and semantic HTML structure.
Entity Browser Selection Widget
In an Entity Browser used for selecting related content, display active filters so content editors know what criteria they're browsing by when selecting entities to reference.
Multilingual Taxonomy Filtering
On a multilingual site with taxonomy-filtered content, display translated taxonomy term names in the filter summary matching the current user's language for a consistent experience.
Tips
- Use the @exposed_filter_summary token in the Content field to position the filter summary anywhere within your result text (e.g., 'Displaying @total @result_label @exposed_filter_summary')
- Enable 'Show labels' when users might not recognize filter values without context (e.g., show 'Category: Electronics' instead of just 'Electronics')
- Use 'Group multi-value filters' to consolidate selections like 'Categories: Electronics, Clothing, Books' instead of repeating the label for each value
- Install the A11y submodule for accessibility-compliant implementations with proper semantic HTML and screen reader support
- When using AJAX Views, the filter summary updates automatically when filters change without full page reload
- The reset link only resets filters shown in the summary, not other filters on the View - useful for preserving certain default filter states
- Custom separator text (comma, pipe, semicolon) can include spacing as needed - default is ', ' with trailing space
- The prefix text appears before all filter items but only when there are active filters to display
- Extend filter support by implementing hook_views_filters_summary_plugin_alias() to map custom filter plugins to existing processing logic
- Use hook_views_filters_summary_info_alter() to customize date formatting or other filter-specific display requirements
Technical Details
Hooks 8
hook_views_filters_summary_info_alter
Alter a filter's summary info definition including ID, label, and processed values. Useful for changing how specific filter types are displayed.
hook_views_filters_summary_replacements_alter
Add or modify replacement tokens available in the summary text format. Allows adding custom tokens like @search_api_fulltext.
hook_views_filters_summary_item_alter
Modify a specific filter item before rendering, including its link attributes and display properties.
hook_views_filters_summary_plugin_alias
Map a filter plugin ID to another plugin's processing logic. Useful when custom filter plugins behave like standard ones.
hook_views_filters_summary_valid_index
Validate an array index value for a specific filter plugin, determining if it should be included in the summary.
hook_views_filters_summary_exposed_form_id_alter
Change the exposed form ID used for matching the summary to its form, required for modules that embed Views in custom forms.
hook_views_filters_summary_filter_value_alter
Alter the raw filter value before it is processed and displayed in the summary.
hook_views_filters_summary_filter_value_label_alter
Modify the display label for a filter value, allowing custom formatting based on filter type or configuration.
Troubleshooting 6
Check if your filter type is supported. For custom filter plugins, install the appropriate submodule or implement hook_views_filters_summary_plugin_alias() to map it to a supported plugin type.
Ensure the View has AJAX enabled in the Advanced settings. The JavaScript checks for the 'views-filters-summary--use-ajax' class to determine submission method.
Enable the views_filters_summary_eb submodule which provides the correct exposed form ID for Entity Browser displays.
For non-AJAX Views, the module uses history.replaceState to update the URL. Ensure your server properly handles the updated query parameters.
The module translates taxonomy terms to the current language. Ensure terms have translations available and the Language module is properly configured.
Range filters display as 'min-max' or use operator prefixes like 'Greater than or equal to' when only one bound is set. This is expected behavior.