mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02: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:
@@ -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 }}
|
||||
|
Reference in New Issue
Block a user