From 3c9ff888cb985a9b6b93eea7e25d490a9a0fe3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 5 Aug 2022 23:52:16 +0200 Subject: [PATCH] nav: prev/next ignores ordersectionby #320 --- layouts/partials/page-meta.hugo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/page-meta.hugo b/layouts/partials/page-meta.hugo index f3bcdd86a5..b1d134cb77 100644 --- a/layouts/partials/page-meta.hugo +++ b/layouts/partials/page-meta.hugo @@ -18,7 +18,7 @@ {{- if $wantsSwagger }} {{- $currentNode.Store.Set "hasSwagger" true }} {{- end }} -{{- template "relearn-structure" dict "node" .Site.Home "currentnode" $currentNode "hiddenstem" false "hiddencurrent" false "defaultOrdersectionsby" .Site.Params.ordersectionsby }} +{{- template "relearn-structure" dict "node" .Site.Home "currentnode" $currentNode "hiddenstem" false "hiddencurrent" false "defaultOrdersectionsby" (.Site.Params.ordersectionsby | default "weight") }} {{- define "relearn-structure" }} {{- $currentNode := .currentnode }} {{- $isSelf := eq $currentNode.RelPermalink .node.RelPermalink }} @@ -61,9 +61,9 @@ {{- $defaultOrdersectionsby := .defaultOrdersectionsby }} {{- $currentOrdersectionsby := .node.Params.ordersectionsby | default $defaultOrdersectionsby }} {{- if eq $currentOrdersectionsby "title"}} - {{- $pages := $pages.ByTitle }} + {{- $pages = $pages.ByTitle }} {{- else}} - {{- $pages := $pages.ByWeight }} + {{- $pages = $pages.ByWeight }} {{- end }} {{- range $pages }} {{- template "relearn-structure" dict "node" . "currentnode" $currentNode "hiddenstem" $hidden_stem "hiddencurrent" $hidden_from_current "defaultOrdersectionsby" $defaultOrdersectionsby }}