fix issue where "children" shortcode only shows top level.

This commit is contained in:
Christopher Greaves 2019-03-09 00:31:20 +00:00 committed by Matthew Taylor
parent 18212e6759
commit 55b1b8ee83

View file

@ -67,11 +67,11 @@
{{if eq $.style "li"}}
<ul>
{{end}}
{{ $.Page.Scratch.Set "pages" .Pages }}
{{ .Scratch.Set "pages" .Pages }}
{{ if .Sections}}
{{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }}
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
{{end}}
{{ $pages := ($.Page.Scratch.Get "pages") }}
{{ $pages := (.Scratch.Get "pages") }}
{{if eq $.sortTerm "Weight"}}
{{template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}