Just to be clear, when passing context from partials built from frontmatter cascades to the partials they call, the new page variable does not give access to variables in the cascade?
frontmatter:
title="A Block of Text"
custom="custom parameter"
[[block]]
section="one"
name="two"
image="three.jpg"
{{- define "left" -}}{{- partial "left/left-list" . -}}{{- end -}}
partials/left/left-list.html
{{- if $.Page.Params.block_1 -}}
{{- range $.Page.Params.block_1 -}}
{{- partial (printf `%s%s%s%s` .section "/" .name ".html" ) . -}}
{{- end -}}
{{- end -}}
partials/blocks/one.html etc
{{/* Access to frontmatter, including variables in blocks. */}}
Each partial should have access to frontmatter, as should the partials they call; however that part works (see above), thanks to someone’s comments earlier.
It’s the references to the cascaded parameters that are problematic.
If I understand correctly, you prefer a simple github repo example to clone:
I am referring to the TOML structure for arrays of key value pairs, '[[block_1]]', which if I understand correctly is equivalent to the following json structure:
When I build the site locally, changing the color scheme and adding some line breaks so I can actually see what is rendered compared to front matter and array iterations, everything looks correct to me.