fix sorting of child and related pages
This commit is contained in:
parent
039399f93c
commit
04f4bdaa46
1 changed files with 6 additions and 3 deletions
|
@ -73,19 +73,22 @@
|
||||||
(ne .Site.Params.showChildArticles "cards") -}}
|
(ne .Site.Params.showChildArticles "cards") -}}
|
||||||
{{- $related := .Site.Pages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
{{- $related := .Site.Pages.RelatedTo (keyVals "parents" .Params.pageid) -}}
|
||||||
{{- partial "card-related"
|
{{- partial "card-related"
|
||||||
(dict "related" $related "header" (i18n "child-articles") "id" "children") -}}
|
(dict "related" $related.ByWeight
|
||||||
|
"header" (i18n "child-articles") "id" "children") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if not .Site.Params.hideRelatedArticles -}}
|
{{- if not .Site.Params.hideRelatedArticles -}}
|
||||||
{{- $related := .Site.RegularPages.RelatedIndices . "topics" -}}
|
{{- $related := .Site.RegularPages.RelatedIndices . "topics" -}}
|
||||||
{{- partial "card-related"
|
{{- partial "card-related"
|
||||||
(dict "related" $related "header" (i18n "related-articles") "id" "related") -}}
|
(dict "related" $related.ByWeight
|
||||||
|
"header" (i18n "related-articles") "id" "related") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if not .Site.Params.hideSiblingArticles -}}
|
{{- if not .Site.Params.hideSiblingArticles -}}
|
||||||
{{- $related := .Site.Pages.RelatedIndices . "parents" -}}
|
{{- $related := .Site.Pages.RelatedIndices . "parents" -}}
|
||||||
{{- partial "card-related"
|
{{- partial "card-related"
|
||||||
(dict "related" $related "header" (i18n "sibling-articles") "id" "siblings") -}}
|
(dict "related" $related.ByWeight
|
||||||
|
"header" (i18n "sibling-articles") "id" "siblings") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if not .Site.Params.hideSectionArticles -}}
|
{{- if not .Site.Params.hideSectionArticles -}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue