Using Views 6.x-3.x-dev

I have a content type called Images and a Content stype called Stars. Both Types share a Vocabulary Called Name. The vocab is tags.

Via a View, I want to display all the images associated with that Star when viewing that particular Star node.

So say I am currently viewing Brad Pitt's Node. This node is tagged the term 'Brad Pitt' in the Names Vocab. I want all his images (too who are tagged 'Brad Pitt') to be displayed below the his node.

So I need to get NODES from type IMAGES that are tagged the same term in vocab NAMES as the currently viewed node

So in the Brad Pitt Node,
get NODES from type IMAGES tagged BRAD PITT from the vocab NAMES

  • I don't get it, node ids are unique
    – iStryker
    Jul 15, 2011 at 4:27
  • nids are unique. What don't you get?
    – Joe
    Jul 15, 2011 at 4:29

2 Answers 2


If I understand you correctly:

Use Taxonomy: Term ID as argument.

Write php to get taxonomy term/terms from current node and return them.

Configure this view to display node types you want to display.


What you need to is

  1. create a view

    • add an argument of the term name or term id.
    • Add a filter of Node: Content type for foo and bar.
    • EDIT: Add another filter for the vocabulary you want.
  2. embed the view into your node. You can embed the view in the node.tpl.php file or add a cck text textarea field, with a php code input filter. Then follow Embedding a View in Drupal 6 using views_embed_view. EDIT: You must pass the term id into the embedded view.

  • That's going to give me all nodes that are tagged with any term in that vocab.
    – Joe
    Jul 15, 2011 at 5:17
  • look at the link, $myArgs has to contain term id. You have to grab it from the node and pass it into the view. With arguments, by default, they will display everything.
    – iStryker
    Jul 15, 2011 at 13:35
  • Embedding the view is not the issue, nor something I am even going to do. It's getting the view to only show the nodes that have the same term as the currently viewed node.
    – Joe
    Jul 15, 2011 at 16:24

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.