Twig does not output data

i have had this problem multiple times …

file: the-huntsman-the-ice-queen-3d/

title: 'The Huntsman & The Ice Queen (3D)'
age_limit: 12
length: 114
visible: true
release: '2016-04-07'

the file tree looks like:



{% extends 'partials/base.html.twig' %}
{% block content %}
  {% set all_movies = page.find('/movies').collection %}
  <section class="movies"> 
    {% for each_movie in all_movies %}
      {% set each_movie_date = each_movie.header.release|date("Y") %}
      <article class="movie">
        <header>{{ each_movie.title }}</header>
          <span class="age_limit">Ab {{ each_movie.header.age_limit }} Jahren</span>
          <span class="length">{{ each_movie.header.length }} Minuten</span>
        <main>{{ each_movie.content }}</main>
        <footer>{{ each_movie_date }}</footer>
    {% endfor %}
{% endblock %}

twig does not render the information in the title and content variable properly. where is my mistake ?

Are you sure you are getting the collection properly? The best way to debug these types of things is to use the {{ dump(var) }} command and look in the debug bar to see what the values are.

Start with all_movies var to ensure you find the collection, if you are getting that, try dumping each_movie, then try each_movie.title etc.

how can i open the debug bar ?

Thanks, now everything works just fine!!