Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/J-Siu/hugo-theme-sk2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-08-22 12:03:16 +0300
committerJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-08-22 12:03:16 +0300
commitceeaef20feca4f1c7ecbfca831320eed31a7b9bc (patch)
tree732025dd5a3a2c39da2c0a3c9811a91eb7c47ce8 /layouts
parent73a4a537d41db9b54a0c324f6c25db9801901ff7 (diff)
list.html - put .Scratch back
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 6cf28a5..a7c3bc5 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -16,10 +16,12 @@
{{end}}
<!--$paginator-->
- {{$paginator := .Paginator}}
{{if .IsHome}}
- {{$paginator = .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections)}}
+ {{.Scratch.Set "Paginator" (.Paginate (where .Site.RegularPages "Type" "in" site.Params.mainSections))}}
+ {{else}}
+ {{.Scratch.Set "Paginator" .Paginator}}
{{end}}
+ {{$paginator:=(.Scratch.Get "Paginator")}}
<!--pagination-->
{{template "_internal/pagination.html" .}}