Community

Way to filter data based on current city selected

I've created an area where users can select the city they're located in. Now once they select their city I need all of the content with the taxonomy term for that city to appear.

I'm just wondering if anyone knows how I could check the city session variable I have created against all of the taxonomy terms for the content which contain the city names. Thus only displaying the content which matches the current selected city.

I'm trying to achieve this through page.tpl but wondering whether I need to delve into the taxonomy module.

Any thoughts? or is there a better way?

Comments

_

why not just add a term reference field to the user and use that as a contextual filter to any views you have that display the filtered content?

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

The users are anonymous

The users are anonymous users.