I’m considering how to add a shortcode that wraps a set of shortcode invocations like:
{{< overall prefix="myprefix" >}}
{{% myinner url="/url1/img1.png" %}}
{{% myinner url="/url2/img2.png" %}}
{{< /overall >}}
And I’m wondering If i can “pass” the prefix
along to each of the shortcodes in .Inner
.
I’ve tried (in shortcode/overall.html)
$.Scratch.Add "prefix" (.Get "prefix")
and then in myinner.html
$.Scratch.Get "prefix"
but it’s empty then.
Is it possible to do?
The idea is to have a prefix in the wrapping function and reuse it for all the inner shortcodes instead of explicitly adding them it as params.