- {% if (serie[index] is not defined or serie[index]|length>1) %}
-
- {% if (serie[index] is not defined) %}Missing book{% endif %}
- {% if (serie[index] is defined and serie[index]|length>1) %}Multiple books with same index{% endif %}
-
- {% endif %}
- {% if serie[index] is defined %}
- {% for indexBook in serie[index] %}
- {% include 'book/_teaser.html.twig' with {book:indexBook} %}
- {% endfor %}
- {% else %}
- {% include 'book/_empty.html.twig' with {serie:book.serie, index:index} %}
- {% endif %}
+ {% if serieMax>1 %}
+
Books in serie
+
+ {% for index in 1..serieMax %}
+
+ {% if (serie[index] is not defined or serie[index]|length>1) %}
+
+ {% if (serie[index] is not defined) %}Missing book{% endif %}
+ {% if (serie[index] is defined and serie[index]|length>1) %}Multiple books with same index{% endif %}
+
+ {% endif %}
+ {% if serie[index] is defined %}
+ {% for indexBook in serie[index] %}
+ {% include 'book/_teaser.html.twig' with {book:indexBook} %}
+ {% endfor %}
+ {% else %}
+ {% include 'book/_empty.html.twig' with {serie:book.serie, index:index} %}
+ {% endif %}
+
+ {% endfor %}
- {% endfor %}
-
+ {% endif %}
{% if serie['?'] is defined %}