Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-rc1
Component:
exposed filters
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2008 at 20:05 UTC
Updated:
25 Jul 2011 at 23:06 UTC
Hi,
Is it possible to remove arguments that are passed in via the URL string when applying filters via an exposed filter?
E.g. I have a view set up called "link" that takes a taxonomy term as it's argument e.g. "link/apples".
Now I want the ability to jump to another taxonomy term using an exposed filter, but if I try this, then the url becomes "link/apples?tid=47" which simply gives me no results because it is first filtering on the apples taxonomy term, then on the "47" term which is say "pears".
If the "apples" term name was removed from the URL then I would be able to jump to the correct taxonomy term. Is it not possible to use arguments and exposed filters alongside each other?
Comments
Comment #1
merlinofchaos commentedThis is not possible.
Comment #2
tordrup commentedActually, it is possible with one line of javascript, if you don't mind approaching it that way.
Put this in the footer of the view, or in your template. Make sure you test for the existence of the form in DOM first.
Obviously useless to users who don't run javascript, but what the hell.
D
Comment #3
gotcha41 commentedI'm looking for the same functionality, trying to remove arguments when applying an exposed filter.
EDIT
THANK YOU tordrup!! Your solution worked like a charm.
Before, I had to hardcode the exposed filter form to get rid of the arguments. Now, on the other hand, I can fully use the existing functionality of exposed filters
Thanks for sharing this solution ! great !
Scenario:
--> filter a view by an exposed filter --> use glossary to filter THESE results again by letter "a" (uses arguments) --> apply new exposed filter that ignores the glossary argument filter