Hi,

I wonder if anyone is able to help me with this.

I have two content types, event nodes and venue nodes. When creating event nodes, I can choose the venue where the event will be held from a list of venues using node reference.

However on each venue page I would like a list of upcoming events that will take place at that specific venue (lets say the next 5 events that will take place at that venue) and a link to each of the event nodes.

Obviously as time goes by and as events pass, the upcoming events on any venue page will need to automatically change to show the next 5 upcoming events.

Is there a way I can do this?

Thank you for your help in advance.

Comments

gpk’s picture

You need to have a look at Views module. There are lots of tutorials around and it's also covered in a number of the available books on Drupal (e.g. Using Drupal).

Probably combined with Views Attach http://drupal.org/project/views_attach, which creates a new Display type "Node content", allowing the output of a View (of a Display to be precise) to be injected into a node page.

You will need to use an argument (Content: Venue), under Action to take if argument is not present select Provide default argument, default argument type = Node ID from URL and that should work. Test by typing the node ID of a Venue in the arguments box under Live Preview. Then create a display per the Views Attach instructions.

Have a play with Views first and see how far you get, and make sure you install Advanced Help and read its documentation etc.

kushal22’s picture

Thanks gpk,

I've just got it working, and its perfect for what I need.