Allow sorting in navbar dropdowns too
This commit is contained in:
parent
a617ad961c
commit
5c84bc0f20
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,8 @@
|
||||||
{{ $home := .Site.GetPage "home" }}
|
{{ $home := .Site.GetPage "home" }}
|
||||||
{{ range where .Site.Pages.ByTitle "Kind" "section" }}
|
{{ range where .Site.Pages.ByTitle "Kind" "section" }}
|
||||||
{{ if eq .Parent $home }}
|
{{ if eq .Parent $home }}
|
||||||
{{ $valid_children := where .Site.Pages.ByTitle ".Parent" "!=" nil }}
|
{{ $sorted_pages := sort .Site.Pages (default "Title" .Params.sort_by) (default "asc" .Params.sort_order)}}
|
||||||
|
{{ $valid_children := where $sorted_pages ".Parent" "!=" nil }}
|
||||||
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
|
{{ $children := where $valid_children ".Parent.UniqueID" .UniqueID }}
|
||||||
{{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}
|
{{ $children := where $children ".Params.hide_in_nav" "!=" "true" }}
|
||||||
<li class="top-level">
|
<li class="top-level">
|
||||||
|
|
Loading…
Reference in a new issue