Help with dictionary rendering of partials with error

Hi,
I am in “index.html” and trying to pass a dict into a partial like so:

  • layouts/index.html

{{ $value1 := "some-text-1" }} {{ $value2 := "some-text-2" }} {{ partial "pagination.html" (dict "first" $value1 "second" $value2) }}

  • layouts/partials/pagination.html

<p>my-values: {{ . }}</p>

--> this works! no error! :slightly_smiling:
--> <p>my-values: map[first:some-text-1 second:some-text-2]</p>

but if…

<p>my-first-value: {{ .first }}</p>

--> it still renders what I want.. but with error! :cry:
--> <p>my-first-value: some-text-1</p>

error.

ERROR: 2016/09/09 21:31:18 template.go:131: template: theme/partials/pagination.html:1:47: executing "theme/partials/pagination.html" at <.first>: first is not a field of struct type *hugolib.Node in theme/partials/pagination.html

After some more research I found this similar issue here.

Thank you in advance.


  • hugo version
    Hugo Static Site Generator v0.16 BuildDate: 2016-06-06T09:37:59-03:00

Sorry this was my fault. :sweat_smile: