From: Jérémy Fabre Date: Mon, 26 Sep 2016 08:05:51 +0000 (+0200) Subject: Remove hidden pages from summary menu X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ed16bc4ca0f0b6057e7b1d222d28df75c97cd1eb;p=mezzo.git Remove hidden pages from summary menu --- diff --git a/app/static/src/js/modules/summary.js b/app/static/src/js/modules/summary.js index f7fdc6c2..b46c6542 100644 --- a/app/static/src/js/modules/summary.js +++ b/app/static/src/js/modules/summary.js @@ -20,7 +20,7 @@ Summary.prototype.init = function() { $template = that.$summary.find('li:first-child'); that.$content.each(function(idx) { - $(this).find('h2').each(function(idx) { + $(this).find('h2:not(.page-box__title)').each(function(idx) { var $element = $(this), $template_clone = $template.clone(); diff --git a/app/templates/pages/menus/current_tree_secondary.html b/app/templates/pages/menus/current_tree_secondary.html index bc19a646..93ab4539 100644 --- a/app/templates/pages/menus/current_tree_secondary.html +++ b/app/templates/pages/menus/current_tree_secondary.html @@ -27,6 +27,11 @@ {% page_menu page %} {% endif %} + {% if page.is_current_or_ascendant and not page.has_children_in_menu %} + + {% endif %} {% endfor %} {% endif %} {% if branch_level == 2 %}