mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 23:23:32 +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>
|
<i class="fas fa-check read-icon"></i>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</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 }}
|
{{ if ne $numberOfPages 0 }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ $currentNode.Scratch.Set "pages" .Pages }}
|
{{ $currentNode.Scratch.Set "pages" .Pages }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user