Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Views exposed filter blocks

Security covered Maintenance fixes only 4,434 sites

Part of the Views ecosystem · 280 projects

This module allows you to display exposed filters from a Drupal view as a separate block. You configure which view and display's filters to use within the block settings, rather than directly within the view itself. This provides more flexibility in how and where filters are presented on your site.

Provides a block type which renders views display exposed filters separately from the view.
It's like Views Block Exposed Filter Blocks module but works for all types of view display plugins (for example for eva view displays which was what I needed) and solves the problem "the other way around".
With this module you select the view and display with the exposed filters to render within the block configuration, not within the view.

If you only need exposed filters in blocks for a views block display plugin, I suggest to use https://www.drupal.org/project/views_block_filter_block or simply try out which of those two fits best.

Based on the implementations like:
https://blog.werk21.de/en/2017/03/08/programmatically-render-exposed-fil...
or
https://drupal.stackexchange.com/questions/236576/render-exposed-filter-...
Thanks to the authors!

Installation & use

  1. Enable the module
  2. Go to block layout (admin/structure/block)
  3. Add a block of type views_exposed_filter_blocks
  4. Select the view & display which holds the exposed filters
  5. Place the block into the region where to display the exposed filters and eventually configure display rules / paths.
  6. Disable AJAX in the view you'd like to use (with ajax is untested)
  7. Place block and result view on the same page so that the filter arguments can be handled by the result view

Additional note:
For some cases it seems that you have to use the "master" view display as result display. You may want to hide the masters exposed filters from output by overwriting

views-view--your-view-name.html.twig

and replacing
{{ exposed }}
with

{# Hide exposed filters. They are shown in a seperate block using views_exposed_filter_blocks: #}
  {#{ exposed }#}
  • Remember to disable AJAX for the selected views, otherwise this currently won't work
  • As it seems this module doesn't work anymore combined with Better exposed filters because BEF requires AJAX to be enabled in some cases!

Alternative modules

Drupal 7

This module will never have a Drupal 7 release. Simply use the great https://www.drupal.org/project/views_block_filter_block

Future plans

If it makes sense we should perhaps add the option to set a target URL for the form submit to make it possible to place the exposed filter block on a page different from the results.

Supporting this module

Support DROWL's ♥ FOSS work on this module on OpenCollective!

Drupal and this module are FOSS. However, it takes dedicated people to develop and maintain. And they need YOU to give back!

We're committed to building and maintaining Drupal modules that benefit the entire community.

Supporting us on OpenCollective helps us continue to improve, innovate and contribute to Drupal's future. Every pledge makes a difference!

If this module has helped you, we would be very grateful for your donation to support its further development and maintenance.

Support our FOSS development ♥️

You can also speed up the development of features or bugfixes you'd love to see, by sponsoring and giving back!

Sponsor a feature or bugfix 🚀

Let's make Drupal even better, together!

Development proudly sponsored by German Drupal Friends & Companies:

webks: websolutions kept simple (https://www.webks.de)
and
DROWL: Drupalbasierte Lösungen aus Ostwestfalen-Lippe (OWL), Germany (https://www.drowl.de)

Drupal 8–11

Ask your assistant about Views exposed filter blocks

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Feb 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
8.x-1.5 Stable 8–11 May 19, 2025
8.x-1.4 Stable 8–11 Dec 10, 2024
8.x-1.3 Stable 8–10 Jun 26, 2023
8.x-1.2 Stable 8–10 Feb 17, 2023