Skip to content

Commit

Permalink
fix menu prev / next navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeantet committed Jul 8, 2017
1 parent 08e0fad commit e078b01
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@
{{end}}
{{end}}
{{ $currentNode.Scratch.Set "prevPageTmp" .menu }}
{{ range sort .menu.Sections }}
{{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
{{ range sort .Pages }}

{{ $currentNode.Scratch.Set "pages" .menu.Pages }}
{{ if .menu.IsHome}}
{{ $currentNode.Scratch.Set "pages" .menu.Sections }}
{{ else if .menu.Sections}}
{{ $currentNode.Scratch.Set "pages" (.menu.Pages | union .menu.Sections) }}
{{end}}
{{ $pages := ($currentNode.Scratch.Get "pages") }}

{{ range $pages.ByWeight }}
{{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }}
{{end}}
{{ end }}
{{ end }}
{{ end }}

Expand Down

0 comments on commit e078b01

Please sign in to comment.