Fix in children shortcode (random failures during generation of description paragraph)

This commit is contained in:
Gennady Pospelov 2018-01-17 17:54:35 +01:00
parent 12cab1bed6
commit 57ffb7bd68

View file

@ -67,11 +67,11 @@
{{if eq $.style "li"}}
<ul>
{{end}}
{{ .Scratch.Set "pages" .Pages }}
{{ $.Page.Scratch.Set "pages" .Pages }}
{{ if .Sections}}
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
{{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }}
{{end}}
{{ $pages := (.Scratch.Get "pages") }}
{{ $pages := ($.Page.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}}