From f0c8585b5003ee2bb49f331a2fef9e4f2a780d13 Mon Sep 17 00:00:00 2001 From: bep Date: Thu, 19 Feb 2015 11:36:09 +0100 Subject: [PATCH] Use $.Paginator in template Since there will only be one paginator per page, this can get rid of some scoping confusion. --- tpl/template_embedded.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/template_embedded.go b/tpl/template_embedded.go index 9b5194941..70e2cbbe9 100644 --- a/tpl/template_embedded.go +++ b/tpl/template_embedded.go @@ -81,7 +81,7 @@ func (t *GoHtmlTemplate) EmbedTemplates() { {{ end }} `) - t.AddInternalTemplate("", "pagination.html", `{{ $pag := .Paginator }} + t.AddInternalTemplate("", "pagination.html", `{{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }}