What is the best way to inject a JavaScript reference to all the Kentico 11 admin UI pages from a Global Event Handler? I've tried accessing the ClientScriptManager from the sender object, but I'm seeing a lot of redundancy and potential null reference exceptions that I'd prefer to avoid. Could I perhaps inject an HTML script tag from my code-only custom module where the global event handler is defined? I'm open to any ideas on how to best accomplish this customization.
Well in this case you can go directly to \CMS\Admin\CMSAdministration.aspx.cs and register your script using ScriptHelper on OnPreRender event.
Technically all Kentico modules are using the same set of page templates if i am not mistaken :
You can cerate UI web part for javascript (there is none) or directly add to the layout or add it as text.
@Peter, the issue there is that I want this JavaScript to run on every Kentico admin UI page. That includes the dashboard as well as any modules in the UI. I don't believe the Kentico Dashboard uses any of those page templates.
Please, sign in to be able to submit a new answer.