drupalfilterviewdrupal-8drupal-exposed-filter

how to use single exposed filter for multiple views in Drupal


I have 4 views created for filtration of information. I'm displaying views as block on home page. I have filter using taxonomy term for filtration.

Now on home page I have 4 blocks in 4 regions with exposed filter, if I want to see information specific to one data then I need to change 4 filters, do we have a way by which I can set filter criteria to all filters in single filter?


Solution

  • The best solution I can think of is to change 3 of them to have contextual filters instead of exposed, and to print their content from code with views_embed_view():

    https://api.drupal.org/api/views/views.module/function/views_embed_view/7.x-3.x

    That way you can collect filter parameter from 4th view filter and pass them to rest 3 of them.