]> git.parisson.com Git - diggersdigest.git/commitdiff
Only show child pages in the left menu for the current page
authorThomas Fillon <thomas@parisson.com>
Thu, 10 Sep 2015 09:58:14 +0000 (11:58 +0200)
committerThomas Fillon <thomas@parisson.com>
Thu, 10 Sep 2015 09:58:14 +0000 (11:58 +0200)
diggersdigest/templates/pages/menus/tree.html

index 361080844b4fd372573604ba48ce7fbd4883a96a..05ea86fc3e9c970c9b0d93eabef9520206dc9bed 100644 (file)
@@ -17,7 +17,7 @@
     <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
     {# wrap the next line with 'if page.is_current_or_ascendant' #}
     {# to only show child pages in the menu for the current page #}
-    {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+    {% if page.is_current_or_ascendant %}{% page_menu page %}{% endif %}
   </li>
   {% endif %}
   {% endfor %}