ref: f0c8585b5003ee2bb49f331a2fef9e4f2a780d13
parent: 62752cfee93160a684da00627405c74a08c3344f
author: bep <[email protected]>
date: Thu Feb 19 06:36:09 EST 2015
Use $.Paginator in template Since there will only be one paginator per page, this can get rid of some scoping confusion.
--- a/tpl/template_embedded.go
+++ b/tpl/template_embedded.go
@@ -81,7 +81,7 @@
{{ end }}
</urlset>`)
- t.AddInternalTemplate("", "pagination.html", `{{ $pag := .Paginator }}
+ t.AddInternalTemplate("", "pagination.html", `{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
<ul class="pagination">
{{ with $pag.First }}