1

I have a views search page in D8 where I'm I have exposed filters that are shown in blocks. I'm also using search facet blocks. What I want in the sidebar is the exposed filter text search field, followed by the facets, and then an exposed filter for selecting a date range.

I've seen a few places mention you can create a duplicate of the views page keeping the same path and have one set of filters in one views block and others in an additional views block. I think this was for D7 because I can't make it work in D8. Basically they replace the url arguments when one or the other is submitted instead of combining them like they normally would do.

What I've currently done is shown the exposed filter block twice and using CSS (display: none) to aria-hidden="true" hide the redundant exposed filters from screens and assistive technology.

It gets flagged though when I used WAVE to test its accessibility since there are duplicative form labels. It's also, imho, a nasty hack and I'd rather do it the right way if possible.

Is there a right or better way?

  • Did you get any should to your query, I'm also looking for the same solution. – Sukhjinder Singh May 11 at 18:59
0

In Drupal 8, Views pages allow you to render your exposed filters as a separate block. In your view, select your Page display, then, under Advanced, toggle on the option Exposed form in block.

enter image description here

You can now separately place the exposed filter like any other block. It doesn't even need to be on the same page as the view results.

| improve this answer | |
  • Thank you for the response. This I'm already doing... the issue is that I want to locate the exposed text field in one place on the page and the other exposed filters elsewhere without duplicating the form. – fallenturtle Mar 20 at 16:55

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.