0

Is there a possibility to filter three separate views blocks by one filter form.

Basically the Idea is:

Filter:

Text field

Date field

Search button

And below we show

First views block Upcoming

Second views block Current

Third views block Past

Whatever we select in the filter is affecting these three blocks. And there are corresponding orderings for each block.

Another complication:

Each block can have a grouping by type:

Example:

Upcoming:

type 1:

data 1

data 2

data 3

Type 2:

data 2

data 23

data 24

And the same is for Current and Past

0

Views Attachment Displays are the way to go, because they are like Blocks but have special options for accepting contextual or exposed filters from the View they are attached to.

Create a Views Page Display with your Text and Date exposed filters, and show Upcoming information there (through the usual Filters).

In the same Views create a new Display of type Attachment. In the Attachment settings set:
Attach to the Page from the previos step,
Attachment position to After
Inherit exposed filters to Yes
Override the Filters to display Current info, and override fields if they are different from the default

Repeat the procedure for adding another Attachment, only this time for the Past information.

You can override the Fields, Filters and Sorting individually for each of those individual displays, while Exposed filters will be applied to all at the same time.

Format can also be overriden for each display. Just make sure you first set it to "This attachment (override)" and Save, even if you have to save the same Format (Table for example). Then under Format settings select your Grouping fields. Although IIUC the Grouping field will be the same in all displays.

The Page you created will show all 3 views results, one below the other, and all will react to the Exposed filter, assuming your 3 different structures share those same fields you have exposed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.