{{ $valid_children := where (where .Site.Pages ".Parent" "!=" nil) ".Params.hide_in_nav" "!=" "true" }} {{ $home := .Site.GetPage "home" }} {{ range where .Site.Pages.ByTitle "Kind" "section" }} {{ if eq .Parent $home }} {{ $sorted_pages := sort $valid_children (default "Title" .Params.sort_by) (default "asc" .Params.sort_order)}} {{ $children := where $sorted_pages ".Parent.UniqueID" .UniqueID }} {{ end }} {{ end }}