Still learning here, but need to update the values in the dictionary items in a slice. Using the code below doesn’t work (unexpected := ). Can someone point me as to the right way to do this?
Thanks
{{ range $idx, $item := $gallery }}
{{ if gt $idx 0 }}
{{ .prevTitle := (index $gallery (sub $idx 1)).Title }}
{{ end }}
{{ if lt (add $idx 1) (len $gallery) }}
{{ .nextTitle := (index $gallery (add $idx 1)).Title }}
{{ end }}
{{ end }}
Thanks