Don't count hidden pages for the sub-menus (#470)

This commit is contained in:
Alekos Filini 2021-03-16 18:29:22 +01:00 committed by GitHub
parent f5f91e39fa
commit d7a4481ff2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,7 @@
<i class="fas fa-check read-icon"></i>
{{ end }}
</a>
{{ $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 }}
<ul>
{{ $currentNode.Scratch.Set "pages" .Pages }}