Toliy
Toliy

Reputation: 27

Drupal Views Relationships

I have the following problem:

I created content type "movies" and content type "actors". I added a node reference to the "actors" which links to movies. When i create new actor content I'm able to select movie from node reference. So, I created a list inside Views which shows you a list of actors and next to the actor it displays one of the movies they were in. I did this through node reference in "actors".

Ok, so here is the problem. I now want to create a list of movies and actor next to the movie. I know I can solve this problem if I create another node reference inside movies and every time I create movie content I would need to select actors attached to the movie. Is there a way to do what I need without creating another node reference. I want to use already existing node reference inside actors and show actor depending on the movie selected for the actor.

Can some one please help me with this problem? Im really stuck.

Thank You, Toliy

Upvotes: 0

Views: 620

Answers (3)

Dan Zinkevich
Dan Zinkevich

Reputation: 11

I've also had a lot of success with the Corresponding Node Reference

After you set up your two node references, you can use simple checkboxes to ensure that they are linked up.

Upvotes: 0

Andre Baumeier
Andre Baumeier

Reputation: 211

Just found out about this, which handles bidirectional relations.

Upvotes: 1

ceejayoz
ceejayoz

Reputation: 179994

You can install the nodereferrer module to provide a counterpart to the node reference fields. It makes node references accessible in both directions so you can do this sort of thing.

Upvotes: 1

Related Questions