From d7a4481ff27888804dc560f70678c5a4da0e7481 Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Tue, 16 Mar 2021 18:29:22 +0100 Subject: [PATCH] Don't count hidden pages for the sub-menus (#470) --- layouts/partials/menu.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 1c27c71ba3..6590454a3e 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -119,7 +119,7 @@ {{ end }} - {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} + {{ $numberOfPages := (add (len ( where .Pages "Params.hidden" "ne" true )) (len ( where .Sections "Params.hidden" "ne" true ))) }} {{ if ne $numberOfPages 0 }}