I’m trying to display certain blocks of html depending on whether it’s the homepage or not.
To do that, I’m using the following:
{{ if eq .Paginator.PageNumber 1 }} <h2 class="only-small align-center">Stories</h2> (...) {{ end }}
However, I sometimes get the error: “a Paginator was previously built for this Node”. I’m guessing this happens because I can only call .Paginator once per page. If so, what’s the right way to do this check?
Update: I’m now trying to use {{ if .IsHome }} but no luck. Maybe because the instruction is inside a partial.