{% extends 'partials/base.html.twig' %}
{% set bodyclass = "categories" %}
{% block content %}
{% set contents = page.collection %}
{% set taxlist = taxonomylist.get() %}
{% for tax,value in taxlist['client'] %}
{% set posts = taxonomy.findTaxonomy({'client':tax}) %}
{% set disposts = {} %}
{% set i = 0 %}
{% for p,v in posts %}
{% if v in contents %}
{% set disposts = disposts|merge({('_'~(v.date|date("Y"))~'_'~i):v}) %}
{% endif %}
{% set i = i+1 %}
{% endfor %}
{{ dump(disposts) }}
{% if disposts|length %}
{{ tax }}
{% for key,post in disposts|ksort|reverse %}
{% include 'partials/projet-block.html.twig' with {'page':post,'display':'text',"key":key} %}