By modstore on
I want to create a views exposed filter that can work with a number of different views.
Basically I want to be able to select a taxonomy term, and then whatever view page i am on, it will be filtered by the selected term(s).
Anyone know if this is possible?
Comments
Instead of using a view block
Instead of using a view block just expose the filter and it will be available on the page.
I have exposed the filter,
I have exposed the filter, and selected to have exposed filter in block. But I want to know if there is a way to have an exposed filter block apply to a number of different views.
After thinking about it more though, I think this is not possible. I think I will write a module to do it another way.
Actually, I'm pretty sure
Actually, I'm pretty sure that it is possible.
When you expose a filter, you can also tell it the name of the variable to use in the $_POST (or $_GET) variable. It is called the "Filter Identifier". If you use the same identifier for the different exposed filters, then they will behave accordingly.
Note, if you use this approach, you will also have to "hide" the filter for all but the first view. You do this be telling the subsequent views to display their filter in a block, and then you never show that block on the page.
True, but AJAX required
This is true with a fix: AJAX must be enabled on all the view blocks, and not on the view page.
Christian López Espínola (@penyaskito)