Use $.Paginator in template

Since there will only be one paginator per page, this can get rid of some scoping confusion.
This commit is contained in:
bep 2015-02-19 11:36:09 +01:00
parent 62752cfee9
commit f0c8585b50

View file

@ -81,7 +81,7 @@ func (t *GoHtmlTemplate) EmbedTemplates() {
{{ 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 }}