0

I am trying to learn views/panels and therefore am working on cinema listings: there are 2 cities, each has 2 cinemas, each cinema has 2 show halls and there is a list of 10 movies, that are shown in some of these halls during the period of 5 days.

The question is - what would be the easiest way to enter and display such listings - should I use panels pages, panel nodes and is it possible to create such things using node references and relations?

please correct me if I'm wrong - i'm a newbie here:

I was thinking to create 10 nodes for each movie, where there is description of the movie, picture, etc, but then I am lost - shoud I create a node for each cinema and so on, or is it better to use taxonomy terms and to add these to each movie: city, cinema, hall and show time - I'm lost here... :(

the result that i want to achieve is that I'm clicking on a movie and I'm getting description and all it's showtimes. And if I'm clicking on particular cinema - I'm getting a timetable with movie names and times.

1 Answer 1

1

You need to get the data structure right, then everything will fall in place using Views.

Apart from city, cinema and movie content types, I'd suggest creating a session content type, too, which would link a movie with cinema, adding the time and hall number information. To maintain relationships between individual chunks of data, you want to use the CCK's node reference module (it is part of D7).

Roughly, you'd go with content types like so:

city (name)
cinema (name, city_ref, hall_count)
movie (name, description, picture, rating)
session (movie_ref, cinema_ref, hall_number, date_time)

It always depends on your requirements, but in this particular case I'd recommend using a separate content type for cinemas instead of taxonomy. Each cinema's node would serve information about the cinema, number of halls, and it would also reference the city it's located in and would be referenced by the screening nodes.

On the other hand if you have no other information about a city other than it's name, it should be safe to set it up as taxonomy.

To make it all work together, i.e. display listing pages, or allow users to search for movies and session times, you'll have to pick up the Views module.

Implementation of a "movie description and all it's showtimes" page would be the movie node page with a view attached (via Views Attach for D6 or EVA for D7) that would list show times for the movie passed as node ID from URL.

For the "cinema timetable with movie names and times", you'd do the same thing, but since you're displaying information about multiple movies, you would also use Views relationship (session -> movie_ref) to fetch in the movie nodes to be able to use their names as a views field.

2
  • Thank you! Will have to study Views though - it seems quite a challenge for me at this moment :( But also I have additional question - is it possible to enter the sessions at the same time (in the same content creation form) when creating a movie? It would be great if I could enter movie description AND it's shows in one form. I do believe that it would be the same views joining two different content types again, or am I wrong? Could anyone explain me a bit more about these things? Commented Aug 16, 2011 at 13:53
  • could you please explain a little bit on how to add hall_count - I would like to enter the exact amount of halls in particular cinema to be able to chose from that number the exact one. Is it possible? Commented Oct 12, 2011 at 16:42

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.