s "Dir" "" }}
		{{ .Scratch.Set "pages" (.Page.Sections | union $rootPage)}}
	{{else}}
		{{ if .Page.Sections}}
			{{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }}
		{{end}}
	{{end}}

	{{ $pages := (.Scratch.Get "pages") }}
	{{if eq $sortTerm "Weight"}}
		{{template "childs" dict "menu" $pages.ByWeight "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "startdepth" $startdepth "pages" .Site.Pages "sectionfilter" (.Get "page") "description" $withDescription "sortTerm" $sortTerm}}