hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit f0c8585b5003ee2bb49f331a2fef9e4f2a780d13
parent 62752cfee93160a684da00627405c74a08c3344f
Author: bep <bjorn.erik.pedersen@gmail.com>
Date:   Thu, 19 Feb 2015 11:36:09 +0100

Use $.Paginator in template

Since there will only be one paginator per page, this can get rid of some scoping confusion.

Diffstat:
Mtpl/template_embedded.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 }}