1

I am working on a drupal7 site. The scenario is that, there are 2 content types namely singers and events. When i am adding an event, i need to add an event to a singer, so that when i am viewing a singer's node page, i can see block containing events related to that singer alone.

I have done the events block inside the singer's content page(Using the views block). But it displays all the events and i want to display the only the events related to that singer alone. I have tried to make it using term reference or some other stuff. But nothing have worked out. Can anyone help me out to get this scenario working. Thanks in advance.

1 Answer 1

0

You can use theentity reference and rules modules for this.

First, add entity ref fields to both singers and events. Then, create a rule so that, when an event is created, which refers to a singer, the singer gets updated with a reference back to the event.

Your singer nodes should therefore have references to all the events that refer to that singer. In the display settings for the singer nodes, you can render the referenced nodes as, say teasers.

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.