Get .Inner data from parent shortcode to inner shortcode

Hi, I have a nested shortcode. Strucutre -

{{< docs-code >}}
parent content
    {{< docs-code-inner >}}
        hi inner content
    {{< /docs-code-inner >}}
{{< /docs-code >}}

What I’m trying to achieve is to get parent .Inner in the child shortcode .

so the inner shortcode will have its .Inner, but how do I also get the parent .Inner in the same file.

I know param is possible by using .Get.

Thanks

That’s not possible. Since the parent’s inner contains child’s inner, you would get a infinite loop/chicken and egg situation.

thanks @bep, appreciate your help. Will create a different structure

I think the only way to pass values from .Inner upwards is to do .Parent.Scratch.Set "foo" "bar" etc.

Got it, thanks Bep