Hello. I add code in header.html
{{ $paginatorTitle := .Paginate (where (where .Site.RegularPages.ByDate.Reverse "Type" "blog") "Params.hide_public" false) }}
{{ if (le 2 $paginatorTitle.PageNumber) }} - {{ T "Page_Number" }} {{ $paginatorTitle.PageNumber }}{{ end }}
And add the code in blog Section tpl.
{{ $paginator:= .Paginate (where (where .Site.RegularPages.ByDate.Reverse "Type" "blog") "Params.hide_public" false) }}
{{ range $k, $v := $paginator.Pages }}
{{ .Render "blog_section.li" }}
{{ end }}
The second condition doesn’t work. If I choose code to
{{ $paginator:= .Paginate (where (where .Site.RegularPages.ByDate.Reverse "Type" "cases") "Params.hide_public" false) }}
{{ range $k, $v := $paginator.Pages }}
{{ .Render "blog_section.li" }}
{{ end }}
I will see blog post, not cases. Why?
How do I override a variable?