I would like to ask how can I create 2 or more exposed filter for the same view,which can be placed in different places of a site. E.g. one exposed filter will have 3 fields,the second one will have 7 fields. thanks
One way is that you can expose the fitler block by configuring (EXPOSED FORM option in views) the "Exposed form in block" to "Yes" for as I have done below:
This way you will have the exposed filter available as a block at "/admin/structure/block".
Now as you want to create expose filter with 3 fields and 7 fields for the same view so than you do the following for that:
- Create view of block type and add the required fields (if you want it to be of fields type).
- Add the fields in "FILTER CRITERIA" section and this will be your expose filter fields. (Right now add the 3 fields).
- Add another block for the same view, and now the view be same and you have all the fields available you have added in the previous block.
- In the new block, add only new expose filter fields (just make sure you select "This page (Override)" while adding the fields for second block.
Hope this will work as you want.
I finally found how to do this: I first create the view with the first exposed filter. Then I clone the view and change the fields of the exposed filter,so as I have a second exposed filter.
Then I can place the first view in which page I want and same thing for the first and second exposed filter.Then I just redirect the exposed filters to the page where the first view exists . (The second view is placed nowhere,it is just used to give us the second exposed filter).
Finally,when I submist an exposed filter,they redirect to the page where the view leaves and the view is filtered from the URL parameters that the exposed filters are sending. I hope this make sense :)
When you say "placed in different places of a site" I am assuming you mean "different places on the page".
The Better Exposed Filter module will get you part of the way there. This module will allow you to assign your exposed filters to a block and display them on some other part of the page. This module will also allow you to define certain filters as "secondary filters", which will appear only after the primary filters have been used.
However, all of the filters have to be in the same place; either in a block, or with the results themselves.
The MEFIBS - More exposed forms in blocks allows exposed filters to be split up into different blocks. Combined with panels, context, or core block visibility settings you could have a different set on each page.