projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62752cf
)
Use $.Paginator in template
author
bep
<bjorn.erik.pedersen@gmail.com>
Thu, 19 Feb 2015 10:36:09 +0000
(11:36 +0100)
committer
bep
<bjorn.erik.pedersen@gmail.com>
Thu, 19 Feb 2015 10:36:09 +0000
(11:36 +0100)
Since there will only be one paginator per page, this can get rid of some scoping confusion.
tpl/template_embedded.go
patch
|
blob
|
history
diff --git
a/tpl/template_embedded.go
b/tpl/template_embedded.go
index 9b5194941f55a90fcb62c7af65653cf455b53434..70e2cbbe97d1cdc4c80dabb96a7517c4474e590d 100644
(file)
--- a/
tpl/template_embedded.go
+++ b/
tpl/template_embedded.go
@@
-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 }}