mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
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:
parent
62752cfee9
commit
f0c8585b50
1 changed files with 1 additions and 1 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue