Open HenrySkup opened 4 years ago
I don't see how. Params are per shortcode used, and you can use the same shortcode multiple times per content file.
true, but if the content has been parsed to find the shortcodes, i would assume that it could have access at that point to each shortcode's param values? My use case is:
I wand to have multiple canvases one one page (using a {{< canvas >}}
shortcode that references the JS script that codes the canvas). All canvases react and style the same way, but each may use different dependencies.
Currently there is no way to indicate at a page level these different dependencies. Of course I could have differently named shortcodes to indicate this -- this wouldn't be very DRY.
true, but if the content has been parsed to find the shortcodes, i would assume that it could have access at that point to each shortcode's param values?
That's true, I guess. But I need to think some about this.
So, we have
.HasShortcode
to tell us, at a page level, if a shortcode is used. It would be useful to be able to access the shortcodes' params at this point, too, to allow for some finer grain control .