From b260aebe0f1121aea5cb1177d8113df81eaa4635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez=20Crespo?= <jaime.perez@uninett.no> Date: Mon, 16 Sep 2019 16:39:38 +0200 Subject: [PATCH] Make the initially visible block in the expander optional If there is no "general" block defined in the expander, it just won't show. --- templates/includes/expander.twig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/includes/expander.twig b/templates/includes/expander.twig index 8096b9133..0817520d3 100644 --- a/templates/includes/expander.twig +++ b/templates/includes/expander.twig @@ -1,11 +1,13 @@ <div class="expandable{% if expanded %} expanded{% endif %}"> + {% if block('general') is defined %} <div class="general"> - {%- block general%}{% endblock %} + {{- block("general") }} </div> + {% endif %} <a tabindex="0" class="expander"></a> <div class="content"> {%- block content %}{% endblock %} </div> - </div> \ No newline at end of file + </div> -- GitLab