From 10c2ec5ac2fbcea6930a19ba831706b29b54ad9a Mon Sep 17 00:00:00 2001 From: Alberto Siles <alberto@siles.pe> Date: Mon, 29 Jul 2024 12:32:39 -0500 Subject: [PATCH] Issue #3421337 by pvbergen: Unexpected token "name" of value "if" --- templates/dataset/forum-list.html.twig | 2 +- templates/layout/book-export-html.html.twig | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/templates/dataset/forum-list.html.twig b/templates/dataset/forum-list.html.twig index 2d537fa..ed7bd70 100644 --- a/templates/dataset/forum-list.html.twig +++ b/templates/dataset/forum-list.html.twig @@ -60,7 +60,7 @@ {% if forum.description.value %} <div class="forum__description">{{ forum.description.value }}</div> {% endif %} - {% if forum.depth > 0 %}{% for i in 1..forum.depth %}</div>{% endfor %}{% endif %} + {% if forum.depth > 0 %}{% for i in 1..forum.depth %}</div>{% endfor %}{% endif %} </td> {% if forum.is_container == false %} <td class="forum__topics"> diff --git a/templates/layout/book-export-html.html.twig b/templates/layout/book-export-html.html.twig index 86bb37e..4287753 100644 --- a/templates/layout/book-export-html.html.twig +++ b/templates/layout/book-export-html.html.twig @@ -34,12 +34,17 @@ to be exported as printer-friendly HTML. #} - {% if depth > 1 %}{% for i in 1..depth-1 %} - <div> - {% endfor %}{% endif %} + {% if depth > 1 %} + {% for i in 1..depth-1 %} + <div class="section-{{ i }}"> + {% endfor %} + {% endif %} {{ contents }} - {% if depth > 1 %}{% for i in 1..depth-1 %} - </div> - {% endfor %}{% endif %} + {% if depth > 1 %} + {% for i in 1..depth-1 %} + </div> + {% endfor %} + {% endif %} + </body> </html> -- GitLab