Creating a view linking three different node types with two node references
I have the following content types:
- Camp - the top level type
- Registration Information - contains node reference to Camp called Camp
- Medical Rele开发者_如何学Pythonase Form - contains node reference to registration information called Camper
I would like to create a View that takes the nid for the Camp, and pulls out all the fields for the Registration Info and Medical Release Form. I'm having trouble figuring out how to set up the various arguments/relationships. I haven't done something that's referenced more than two types.
I know it would be smart/best to just combine the Registration Info and Medical Release Form, since it's a 1:1 mapping, but we can't. So... any help would be appreciated!
Start at the bottom, with a node type filter of Medical Release Form. Create a relationship on the Camper field. Now you have Medical Release Form -> Registration Information (Camper).
Create another relationship on the Camp field, this time with the "Relationship:" set to Camper. That gets you all the nodes linked together, Medical Release Form -> Registration Information (Camper) -> Camp.
To add fields, just make sure you're selecting the relationship the fields come from. To limit it to a specific Registration Information node, add a node NID argument and set the "Relationship:" of that argument to Camper.
精彩评论