How do you compare terms on two nodes, and show only terms that are common to both nodes. This post on stackexchange seems to accomplish a part of it but still stuck. Any help appreciated

http://drupal.stackexchange.com/questions/69426/get-list-of-taxonomy-ter...

CommentFileSizeAuthor
#2 2.png16.03 KBrenatog
#2 1.png22.18 KBrenatog
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ReboundToday created an issue. See original summary.

renatog’s picture

FileSize
22.18 KB
16.03 KB

Hi, how are you?

Exists an answer for it:

  1. Create a new view on Taxonomy table. You are basically showing taxonomy terms.
  2. In the View creation page, uncheck "create page" and check "Create block". Give it a title "Categories". Click "Continue and Edit".
  3. In the Views UI, add a new Relationship Taxonomy term: Content with term, and uncheck "require this relationship".
  4. Add a new Contextual filter : Content: Nid and choose the just-created relationship as the relationship, Provide default value > Content ID From URL under When the filter value is NOT available. Also add basic validation check to the contextual filter.
  5. Save the View and put the block where you want to display.

You can check the view by entering a test node ID to the preview field. It should show all taxonomy terms attached to THAT node.

renatog’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.