1

I have to make a page, containing 3 rows with 3 blocks with content teasers. Preferably the page layout should be made through a basic page content type item, through the Layout Builder, so it is easy to add other stuff.

At the top of the page should come a view's exposed filter for the teasers. So, the teasers that are shown must be filtered for some selected content types plus for some taxonomy terms. I've been able to make that filter on a normal view page. Also I accomplished to get the filter in a separate block. But, because of the fact that both a basic page and a view page need a url, I couldn't accomplish this idea.

Is it possible to make a basic page with separate rows of view blocks via the Layout Builder, reacting collectively to an exposed views filter?

2
  • 1
    I'm not 100% sure what you're trying to achieve but it sounds like you've got your view blocks working. How come you can't add them to your basic page content type via the block listing admin screen. As it sounds like you're trying to use the layout builder when it might not be needed?
    – Leigh
    Sep 19, 2019 at 14:15
  • Yes, view blocks plus filters work. Your suggestion of using the block placement will not provide in a joint filter for all of the blocks that will be present on the page.
    – C.A. Vuyk
    Sep 19, 2019 at 17:51

1 Answer 1

0

Views Attachments Displays have the option to inherit the exposed and contextual filters from the Views displays they're attached to. So you can try to create one Views Page Display with some of your results, then create as many Attachment Displays (not Block Displays) as you need and attach them to the Page Display.

I haven't tried the Layout Builder with different Views displays like that, but I think it may work to rearrange them a bit.

I think you could also have Views Blocks (that are on the same Views) share the same Exposed filter settings (don't override them), and use the Exposed filter in a block option where you place the exposed filter part of Views as a block in a theme region instead of always appearing it automatically above the Views results.

You may also want to check out the Views Global Filter module that affects all Views exposed filters once a user chooses one option.

3
  • Thanks for the suggestions prkos. Attachments is an interesting option, however that won't work if you want to use the layout builder to layout several rows with some row in between that is not part of the view. Exposed filter in a block will only work if the view is a page view, and that was a problem because the basic page with layout builder has the url.
    – C.A. Vuyk
    Sep 19, 2019 at 17:48
  • The Views Global Filter module sounds like the thing for you, have you tried it?
    – prkos
    Sep 19, 2019 at 18:06
  • Perhaps I'll try that one, but at first I would like to do things without adding extra modules. Thanks again
    – C.A. Vuyk
    Sep 19, 2019 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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