Attached is a patch for location_views.module to enable using the country, Province and City as arguments for the views module.
For example on http://findbiodiesel.ca I have created a view with the path 'in' and the arguments 'province' and 'city' and therefore to find biodiesel in bc you would go to: http://findbiodiesel.ca/in/BC and to find it in Victoria you would go to http://findbiodiesel.ca/in/BC/Victoria
Next I will create a block that will fill in the province and city using select menus.
Remember that the views module does very aggressive caching and therefore after you update this module you will have to clear all the cache views_argument before this becomes available. The only way I know of doing this is to edit the mysql database.
| Comment | File | Size | Author |
|---|---|---|---|
| location_views.module_0.patch | 4 KB | webgeer |
Comments
Comment #1
karens commentedWebgeer, thanks for this. I was just getting ready to add this in and you saved me some time. I'll get it committed soon. :-)
I've set up a separate project for the location_views module to make it easier to track bugs and feature requests. Moving this issue to that page.
Comment #2
karens commentedSaid I was moving it, but didn't get it moved...
Comment #3
karens commentedI've add argument support to the cvs version of the module. I made some changes to what you provided -- changed the function names to use the location_views prefix, filled out the argument link info so you can see links on summary views, and added an option to the city name to do an alpha directory of city names. The way that works is if you leave the option blank it will use the full city name as usual. If you put in a number (generally 1) it will summarize by the first letter of city names instead of full city names, giving you a a/b/c type city directory. I also added another default view that uses arguments instead of filters and made both default views disabled so they don't override any existing views if the names are already in use (use add to enable them).
Comment #4
karens commentedNeed to change the status, but reopen if there are any problems.
Comment #5
(not verified) commented