{% extends 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% set image = page.media.images|first %}

{% block body %}
    <section id="item" class="section blog-listing">
      <div class="bandeau">
        {% if image %}
          {{image.html}}
        {% endif %}
      </div>

      <div class="content">
        <h2>{{page.title}}</h2>
        {{content}}
        {% for item in page.collection %}

        <div class="sub-content">
          {% set child_image = item.media.images|first %}
          {% if image %}
            {{child_image.html}}
          {% endif %}
          <h3>{{item.title}}</h3>
          {{item.content}}
        </div>

        {% endfor %}
      </div>

        {% block sidebar %}
          {% include 'partials/sidebar.html.twig' %}
        {% endblock %}
      </section>

{% endblock %}
