How to depict schedules for a cinema site

Hey Community!

I’m asking myself how to structure and depict schedules for movies (in YAML) for a cinema site!

Any thoughts? Advice? How to go about this?

just wondering how to layout a cinema site (YAML-file-structure) …

I’d store them in yaml format, in a user/config/cinema.yaml file, and reference it from the Twig that lists the shows

This is movie.md
and it’s header has the following information:

shows:
  - 2016-kw-12:
    thursday: ['15:15', '17:45', '20:30']
    friday: ['15:15', '17:45', '20:30']
    saturday: ['15:15', '17:45', '20:30']
    sunday: ['15:15', '17:45', '20:30']
    monday: ['15:15', '17:45', '20:30']
    tuesday: ['15:15', '17:45', '20:30']
    wednesday: ['15:15', '17:45']

I would like to pull out all the timestamps of this list in a separate Twig-file !


{% set current_year = now|date("Y") %}
{% set current_week = now|date("W") %}

{% set path = current_year ~ '-kw-' ~ current_week %}

{% set all_shows = page.header.shows %}

{% for each_show in all_shows %}
  {% for thursdays_show in each_show.path.thursday %}
    {{ thursdays_show }}
  {% endfor %}
{% endfor %}

doesn’t work.

{% set movies = page.find('/movies/' ~ path).collection %}

helped me.