Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-alpha5
Component:
taxonomy data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 May 2009 at 16:37 UTC
Updated:
8 Jul 2010 at 22:00 UTC
Views is the best thing since sliced bread but I've hit a snag.
I need to send multiple terms to a view, it works fine when addressing the view directly through the url e.g.
path/+2+1/+3+5+4
but when I send this from within a module the arguments are encoded to
path/%252B2%252B1%252F%252B3%252B5%252B4%252F
which of courses produces a negative result.
Is there a way to alter the separator characters to one that won't be encoded by Drupal?
Thanks
Comments
Comment #1
beeradb commentedComment #2
dawehnerwhat do mean here
Could you please paste your code here?
thx!
Comment #3
kiteglinton commentedHi, I was wanting to send a set of aguments to a view to list all nodes with a combination of taxonomy terms. The terms derived from a series of checkboxes and sends them as 4 strings, each a list of terms seaparated by "+"
$path = [path-to-view];
$args = "$types_str/$categories_str/$regions_str/$salary_str"; //
$form_state['redirect'] = $path.$args;
If I called the view directly then it dosplayed fine but the above code routes through the Drupal encoding and ends up undecipherable to the view. I've got round the problem in a very poor way by sending the strings with a "-" separator (which does not get encoded) and tweaking the views file "views_handler_arguments.inc" which I didn't like doing but could find no other solution to.
Thanks Kit
Comment #4
kiteglinton commentedActually I'm not quite there yet. I managed to get a "-" to the view to replace a "+" but now I need to get an AND to the view represented by "," seaprator to the arguments.
As before a comma is encoded before it reaches the view so I need to find a better way to replace "+" and "," by characters which are not encoded.
My arguments are all numeric so I could use any alpha char but nit sure where the best place to tweak the code would be.
Thanks for any suggestions
Comment #5
esmerel commentedGiven the age of this issue, I have hope that it's resolved or no longer relevant.