Community

Store User-selected Settings for Use Throughout Site

I'm looking at upgrading a site that contains all sorts of activities, services etc. based on a user selected city in my local geographical area. Currently when you select a top-level category such as restaurants for instance, a page is displayed listing all the cities in the area which currently comes from a taxonomy. Clicking on a city link displays a view of restaurants using the clicked on city as an argument. Besides restaurants, there are several other top-level categories each which follow this same pattern which is redundant, Select a Category->Display Page of Cities->Select City->Display Results.

What I would like to do is avoid display the selection of cities when viewing each category and instead have a way for the user to first input their desired city somewhere at the top of the site which is remembered. Then, any category that is selected would use this stored location to pass to views as an argument to get the results. The selected city should remain selected site-wide until it is changed or removed. Any page that you visit would show the user's selected location in the header such as "Selected city: San Francisco [Change] | [Remove]". Removing it would clear the choice and whatever view is called without a city specified would display all results for the category.

This is somewhat analogous to some auto parts websites that I've seen where you specify the year, make and model of your car and then whatever category you visit, you are only seeing results based on what you entered and this information remains valid until you clear it or choose another model. I only need to store one value, the city but this may expand in the future.

Does anyone know of how I can achieve something like this? Is there perhaps some module or modules in addition to Views that already exists to achieve this? I don't know this would involve storing data in a SESSION variable or something and then somehow passing that to Views?

Thanks for any input!

Comments

Upon some further review, I

Upon some further review, I came across the Views Global Filter http://drupal.org/project/global_filter project. I have not yet tried it and verified whether it meets my needs but just wanted to put this up in case anyone else looking for a similar solution comes across this post.

nobody click here