diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 5a3c2710a8..e7b13ad7a3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -34,9 +34,15 @@ {{end}} {{ $pages := ($currentNode.Scratch.Get "pages") }} - {{ range $pages.ByWeight }} - {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} - {{end}} + {{if eq .Site.Params.ordersectionsby "title"}} + {{ range $pages.ByTitle }} + {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} + {{end}} + {{else}} + {{ range $pages.ByWeight }} + {{ template "menu-nextprev" dict "menu" . "currentnode" $currentNode }} + {{end}} + {{ end }} {{ end }} {{ end }}