mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +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 }}
|
{{ end }}
|
||||||
</urlset>`)
|
</urlset>`)
|
||||||
|
|
||||||
t.AddInternalTemplate("", "pagination.html", `{{ $pag := .Paginator }}
|
t.AddInternalTemplate("", "pagination.html", `{{ $pag := $.Paginator }}
|
||||||
{{ if gt $pag.TotalPages 1 }}
|
{{ if gt $pag.TotalPages 1 }}
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
{{ with $pag.First }}
|
{{ with $pag.First }}
|
||||||
|
Reference in New Issue
Block a user