I try and call a partial like so:
{{ $homepage := false}} {{ partial "header" (dict "context" . "homepage" $homepage) }}
Then when I try and reference like so
{{if .homepage }}zombies{{else}}monsters{{end}}
I get an error:
homepage is not a field of struct type *hugolib.Node
Shouldn’t it be referencing the dictionary?
I ran that with v0.15 and it works. Setting $homepage reflects in the partial. Only change that I made was to use {{ partial "header.html". I tested it on with both pages and nodes.
$homepage
{{ partial "header.html"
Yeah I actually had a different problem. I’m ridiculous. I was editing the wrong template file. Thanks!!!