mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 04:16:13 +00: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:
1 parent
62752cfee9
commit
f0c8585b50
1 file changed
+1
-1
@@ -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