1

I have "Event," "Session," and "Download" content types. Events can have many sessions, and each session can have many downloads. I have used node references to link the downloads to the sessions, and sessions to the events. Can I create a view of the downloads which will show session information and also the event information? I know I can use a relationship to link two node types in a view, but can I do it for three node types?

I'm using Drupal 7, and Views 3.

migrated from stackoverflow.com Aug 5 '11 at 22:12

This question came from our site for professional and enthusiast programmers.

3

I found my answer at Multiple Node Relationships?

The answer is to go to the Relationships section and add two relationships, each for your node references. You'll find them under the 'Content' group. When adding the second relationship, select it to use the first relationship so that they chain. That will get you "base" node being the lowest level child, the first relationship is that node's parent, and the second relationship is the grandparent.

Then, add the Node: title field 3 times. Set 1 to use no relationship, 1 to use the first relationship, and 1 to use the second. Preview your view. That should get you the basis for what you want. Add sorts, filters and other fields to taste.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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