2

I need help creating a view in Drupal 7 with the following logic:

  • My users have taxonomy reference field.
  • My articles also have taxonomy reference field.

When a user is logged in I want them to see only the articles that have the same term as the logged in user. How to set the relationships and contextual filters in this view?

1 Answer 1

0

Create a view to display the article content, then add as relation for user and add a contextual filter for UID for logged in user.

Add new filter for content taxonomy and it must be equal to user taxonomy.

1
  • 1
    Hi Prem, thanks for your answer. I don't understand this part "add as relation for user". When I click the "Add" button of the "Relationships" section, which one should I select? The only one that mentions "user" is called "Content revision: User" but I don't think this is the one I need.
    – jibonita
    Dec 29, 2015 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.