My second argument for a gmap style view is a city name, provided by url. It works fine for single word city names like 'Reseda' but not for multiple word names like 'Canoga Park'. The url supplies the name as 'Canoga_Park', with an underscore. I need to remove the underscore for the gmap lookup. I've set the default argument for Location:City to
return str_replace('_', ' ', $arg[2]);
No joy. I suspect this has something to do with the limitation that the argument return only a single value but I don't know enough about the underlying system to tell and I don't know how to debug a view.
Nope, it's Views 2. It wants the value for just the one argument, in this case the city name.
On Wed, 2010-01-06 at 11:44 -0800, Domenic Santangelo wrote:
On Jan 6, 2010, at 9:10 AM, Scott wrote:
return str_replace('_', ' ', $arg[2]);
If this is Views 1:
$args[2] = str_replace('_', ' ', $arg[2]); return $args;
-D
So I gave up on this approach. I've rewritten the module that creates the menu containing the list of urls I was concerned with. The city strings now have a blank space. Fortunately these links are strictly internal (unless someone bookmarks any of them).
On Wed, 2010-01-06 at 14:04 -0800, Scott wrote:
Nope, it's Views 2. It wants the value for just the one argument, in this case the city name.
On Wed, 2010-01-06 at 11:44 -0800, Domenic Santangelo wrote:
On Jan 6, 2010, at 9:10 AM, Scott wrote:
return str_replace('_', ' ', $arg[2]);
If this is Views 1:
$args[2] = str_replace('_', ' ', $arg[2]); return $args;
-D