This was a long and puzzling post …
In general:
- .Page.Scratch is Page scoped, ie. available for all shortcodes in the same page.
- Shortcodes are rendered inside out, so you cannot get a scratch var from the outer shortcode before it is executed … If that made sense in an Einsteinian way …
There is also this:
{{ with .Parent }}
{{ .Scratch ... }}
{{ end
I’m not sure that covers all your questions, but $.Page.Scratch.Add
will never point to a shortcode’s scratch.
But in general, I think you use scratch where you should really use shortocde parameters.