<div id="related-pages">
  <hr>
  <h3>Voir aussi</h3>

  <div id="related-grid">
  {% set category = random(page.taxonomy.category) %}
  {% set p = random(taxonomy.findTaxonomy({'category': category}))%}
  {% if p == page %}
    {% set category = random(page.taxonomy.category) %}
    {% set p = random(taxonomy.findTaxonomy({'category': category}))%}
    {% if p == page %}
      {% set category = random(page.taxonomy.category) %}
      {% set p = random(taxonomy.findTaxonomy({'category': category}))%}
      {% if p == page %}
        {% set category = random(page.taxonomy.category) %}
        {% set p = random(taxonomy.findTaxonomy({'category': category}))%}
      {% endif %}
    {% endif %}
  {% endif %}
  {% include 'partials/projet_card.html.twig' %}

  {% set p = random(page.parent.children) %}
  {% if p == page or p == related_category_page %}
    {% set p = random(page.parent.children) %}
    {% if p == page or p == related_category_page %}
      {% set p = random(page.parent.children) %}
      {% if p == page or p == related_category_page %}
        {% set p = random(page.parent.children) %}
      {% endif %}
    {% endif %}
  {% endif %}
  {% include 'partials/projet_card.html.twig' %}

  {% set random_utilite = random(page.find('/projets').children) %}
  {% set p = random(random_utilite.children) %}
  {% if p == page or p == related_utilite_page or p == related_category_page %}
    {% set random_utilite = random(page.find('/projets').children) %}
    {% set p = random(random_utilite.children) %}
    {% if p == page or p == related_utilite_page or p == related_category_page %}
      {% set random_utilite = random(page.find('/projets').children) %}
      {% set p = random(random_utilite.children) %}
      {% if p == page or p == related_utilite_page or p == related_category_page %}
        {% set random_utilite = random(page.find('/projets').children) %}
        {% set p = random(random_utilite.children) %}
      {% endif %}
    {% endif %}
  {% endif %}
  {% include 'partials/projet_card.html.twig' %}
  </div>
</div>
