Hi all, I've created a plugin which needs to inject some raw javascript into the head section. I can include the raw js via a partial with something like {% partial 'MyPlugin/head-script' %} (unless you can recommend a better way), but the important thing is that it only gets rendered/output when the component is active on the current page.
How might I go about doing that?
Last updated