diff --git a/layouts/index.html b/layouts/index.html
index f8499aa..e0a21df 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,11 +1,12 @@
{{ define "main" }}
- {{ partial "pagination.html" . }}
- {{ if eq .Paginator.PageNumber 1 }}
+ {{ $pagination := .Paginator }}
+ {{ partial "pagination.html" $pagination }}
+ {{ if eq $pagination.PageNumber 1 }}
{{ .Title }}
{{ partial "content.html" .Content }}
{{ end }}
- {{ range .Paginator.Pages }}
+ {{ range $pagination.Pages }}
{{ end }}
- {{ partial "pagination.html" . }}
+ {{ partial "pagination.html" $pagination }}
{{ end }}
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
index d62540d..64c9e35 100644
--- a/layouts/partials/pagination.html
+++ b/layouts/partials/pagination.html
@@ -1,6 +1,7 @@
-{{ $pag := $.Paginator }}
+{{ $pag := . }}
+{{ $scratch := newScratch }}
{{ if gt $pag.TotalPages 1 }}
-{{ $.Scratch.Set "dot_rendered" false }}
+{{ $scratch.Set "dot_rendered" false }}