drupal-7drupal-viewsdrupal-taxonomy

Drupal 7: list content tagged by the same term as a user


Ok, so I have a taxonomy vocabulary called "topics". All content can be tagged with one or more topics.

Then, users can selected their topics or interest. So, users can also be tagged with one or more topics.

Now I'm trying to display a view that shows all the content that has the same tag as the currently logged in user. Any clue on how I could go about that?


Solution

  • You will need to use advanced settings (context filters and relationships) for this. Try doing this:

    1. Under relationships add:

      • Content: Taxonomy terms on node --> Tags
      • Taxonomy term: User using Tags
    2. Under contextual filters add:

      • User: Uid --> Provide default value --> User ID from logged in user