mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-31 08:57:15 +00:00
Merge pull request #105 from gpospelov/master
Bug fix in sidebar menu and children description generation
This commit is contained in:
commit
1aee7f25bd
2 changed files with 6 additions and 6 deletions
|
@ -111,11 +111,11 @@
|
||||||
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
|
||||||
{{ if ne $numberOfPages 0 }}
|
{{ if ne $numberOfPages 0 }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ .Scratch.Set "pages" .Pages }}
|
{{ $currentNode.Scratch.Set "pages" .Pages }}
|
||||||
{{ if .Sections}}
|
{{ if .Sections}}
|
||||||
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
|
{{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ $pages := (.Scratch.Get "pages") }}
|
{{ $pages := ($currentNode.Scratch.Get "pages") }}
|
||||||
|
|
||||||
{{if eq .Site.Params.ordersectionsby "title"}}
|
{{if eq .Site.Params.ordersectionsby "title"}}
|
||||||
{{ range $pages.ByTitle }}
|
{{ range $pages.ByTitle }}
|
||||||
|
|
|
@ -67,11 +67,11 @@
|
||||||
{{if eq $.style "li"}}
|
{{if eq $.style "li"}}
|
||||||
<ul>
|
<ul>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ .Scratch.Set "pages" .Pages }}
|
{{ $.Page.Scratch.Set "pages" .Pages }}
|
||||||
{{ if .Sections}}
|
{{ if .Sections}}
|
||||||
{{ .Scratch.Set "pages" (.Pages | union .Sections) }}
|
{{ $.Page.Scratch.Set "pages" (.Pages | union .Sections) }}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ $pages := (.Scratch.Get "pages") }}
|
{{ $pages := ($.Page.Scratch.Get "pages") }}
|
||||||
|
|
||||||
{{if eq $.sortTerm "Weight"}}
|
{{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}}
|
{{template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue