]> git.parisson.com Git - mezzo.git/commitdiff
Add some conditions to secondary tree menu
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Wed, 28 Sep 2016 08:38:30 +0000 (10:38 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Wed, 28 Sep 2016 08:38:30 +0000 (10:38 +0200)
app/templates/pages/menus/current_tree_secondary.html

index 93ab453979b89fa1f01baa125f86636489ccc349..a0efef952ef82ec55838fb38012cd915bcb4e5fd 100644 (file)
@@ -18,8 +18,7 @@
                 {% endif %}
             {% endif %}
         {% endfor %}
-    {% endif %}
-    {% if branch_level == 1 %}
+    {% elif branch_level == 1 %}
         {% for page in page_branch %}
             {% if page.is_current_or_ascendant and page.has_children_in_menu %}
                 <li class="nav-tree__item">
@@ -33,8 +32,7 @@
                 </ul>
             {% endif %}
         {% endfor %}
-    {% endif %}
-    {% if branch_level == 2 %}
+    {% elif branch_level == 2 %}
         {% for page in page_branch %}
             <li class="nav-tree__item">
                 <a class="nav-tree__link{% if page.is_current or page.is_current_or_ascendant %} active{% endif %}" href="{{ page.get_absolute_url }}">{{ page.title }}</a>