Is it possible to pass data (string variable) generated in one partial to another? Partials do not call each other (so no dict), function in different page’s parts, page is the same for both partials, data differs for different pages and changes on rebuilds.
I guess .Store is not relevant, cause it’s not changing when Hugo rebuilds, .Scratch only. And usage of .Scratch in deeply nested partials requires brand new page
function which could cause troubles with partialCached. Are there other options? Can I generate something like files from one partial and then use them in another?
No. That would do nasty things with Hugo’s parallelism.
1 Like
You either have to pass the state as parameters, or use Scratch/Store and hope the caching doesn’t work against you. You can pass multiple params as a dict: {{ partial "foo.html" (dict "name" $name "page" $page "thing" $thing) }}
.
1 Like