Skip to content

Commit 1aee7f2

Browse files
authored
Merge pull request #105 from gpospelov/master
Bug fix in sidebar menu and children description generation
2 parents 7165e00 + 57ffb7b commit 1aee7f2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

layouts/partials/menu.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ <h3>{{ if not $disableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}</h3>
111111
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
112112
{{ if ne $numberOfPages 0 }}
113113
<ul>
114-
{{ .Scratch.Set "pages" .Pages }}
114+
{{ $currentNode.Scratch.Set "pages" .Pages }}
115115
{{ if .Sections}}
116-
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
116+
{{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
117117
{{end}}
118-
{{ $pages := (.Scratch.Get "pages") }}
118+
{{ $pages := ($currentNode.Scratch.Get "pages") }}
119119

120120
{{if eq .Site.Params.ordersectionsby "title"}}
121121
{{ range $pages.ByTitle }}

layouts/shortcodes/children.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
{{if eq $.style "li"}}
6868
<ul>
6969
{{end}}
70-
{{ .Scratch.Set "pages" .Pages }}
70+
{{ $.Page.Scratch.Set "pages" .Pages }}
7171
{{ if .Sections}}
72-
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
72+
{{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }}
7373
{{end}}
74-
{{ $pages := (.Scratch.Get "pages") }}
74+
{{ $pages := ($.Page.Scratch.Get "pages") }}
7575

7676
{{if eq $.sortTerm "Weight"}}
7777
{{template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}

0 commit comments

Comments
 (0)