4

I'm not sure how to overcome this. So far I have managed to do it by simply duplicating the view, but this is not a good idea.

The view needs to have two exposed filters. These blocks are styled different and sit in different parts of the site, so they need to be independent.

Is it possible to expose two filter blocks from one view?

  • How did you finally solve this?I have the same issue – sokratis Sep 28 '13 at 17:11
3

An alternative to this is to

  • Clone your page display - but do not change the cloned pages path...
  • Override and modifty the filters for that cloned display

You will have an exposed block with different filters that submits to the original view.

  • What about if the view has no path,instead it exists in a panel page? – sokratis Jul 5 '13 at 19:57
  • 1
    @sokratis it would be a question with tag panels I guess ;) and maybe one worth asking. – Mołot Sep 3 '13 at 13:58
3

So you're reusing a single view in multiple places on a site, but based on where it is in the site it will have different filters exposed?

What I would do is just expose both filters in the view, but use CSS to apply a display: none; property to which ever filter you don't want exposed/manipulated. Assuming you don't give default values to the filters when they're displayed on a page, hiding individual filters using CSS won't have any negative affects when you apply them.

EDIT: Also, I think if an input element has it's display property set to none, then most browsers won't even send the data contained in that field along in the HTTP request when the form is submitted.

2

Personally I use the context module to manage one display with the path as condition of displaying the occurence of the exposed fitler block in the region I choose, and on the other hand the block display system of Drupal (in structure) to manage the second display type with path conditions too (only on those pages). Then css is the last step using the id or class of each region for example to identify the display style.

1

A little late, but maybe still useful. The Views module does not support this out of the box. But I have written a module that addresses this problem: MEFIBS - More exposed forms in blocks

The rationale behind it is explained here: http://blog.dev030.com/posts/additional-exposed-filter-block-views

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.