Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.3
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2009 at 15:56 UTC
Updated:
6 May 2009 at 17:50 UTC
I am trying to conceptualize a project and am stumped on the following part.
I am going to have various content types that all have a taxonomy term of either US or International. I plan to set the user's location in the session variable:
$_SESSION['locale'] = 'US';
Question: Can I create a view that will show a content type and filter it to show only it's node's whose taxonomy also matches the locale session variable.
Example:
PRODUCT
Product A: contains US information: Taxonomy Location = US
Product A: contains INT information: Taxonomy Location =INT
Using this example, and assuming the session variable is set to 'US', how can I set a view to display Product A whose taxonomy term is set to US?
Comments
Comment #1
3cwebdev commentedI was able to adapt a snippet I found in a handbook.
My solution was to create a view argument by Taxonomy Term.
Set it to Provide Default Argument->PHP Code
This will show my products whose Taxonomy Term match the $_SESSION variable that I set earlier.
Comment #2
dawehnerthx for finding it yourself :)
so this can be marked as fixed.