mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 21:38:36 +08:00
Don't count hidden pages for the sub-menus (#470)
This commit is contained in:
parent
f5f91e39fa
commit
d7a4481ff2
@ -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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user