From 03c0eb6f817155fc58e467ce0834e12e9d8e4d54 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Thu, 20 Jul 2023 19:02:59 +0200 Subject: [PATCH] add pagination to short list with full content --- layouts/_default/list.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1ce5dc1..d699ce7 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,7 +7,13 @@

{{ i18n .Title }}

{{ $showFullContent := in .Site.Params.sectionsWithFullContentOnListPage .Section }} {{ $pages := where .Pages "Params.hidden" "!=" true}} - {{ range $pages }} + + {{ $pagesRange := $pages}} + {{ if $showFullContent }} + {{ $pagesRange = (.Paginate $pages).Pages }} + {{ end}} + + {{ range $pagesRange }}
@@ -21,6 +27,9 @@ {{ partial "post-info.html" . }}
{{ end }} + {{ if $showFullContent }} + {{ partial "pagination.html" . }} + {{ end}}
{{ end }} \ No newline at end of file