GAZ082
1
Hi!
I want to hide all posts in the list template except when I’m at home, this is hiding all posts even when I’m NOT at home!:
{{ $paginator := .Paginate (where (where .Pages.ByDate.Reverse "Section" "eq" "post" ) .IsHome "eq" "false")}} {{ partial "pagination.html" . }} {{ range $paginator.Pages}}
Any tips? Thanks!
From the way I see it, the .IsHome
variable is mostly used with a conditional like this:
{{ if .IsHome }}
<!-- Do your thing here if it's the homepage. -->
{{ end }}
bep
3
You need to do .Kind "eq" "home"
system
Closed
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.