Smarty PHP Include
Jamroom Developers
that would be the LAST option I would choose. options I would try before that would be
$_js = array('source' => "{$_conf['jrCore_base_url']}/modules/jrCore/contrib/tinymce/tinymce.min.js?v={$_mods['jrCore']['module_version']}");
jrCore_create_page_element('javascript_href', $_js);
like this if I wanted to add in a linked .js file to the page, add that in a listener that fires at a point where all of the variables you are interested in are available.
find an event that happens exactly, or close to what you want, all the data for building that event will come in with ($_data, $_user, $_conf, $_args, $event)
so it will be easier to determine if you want to add your code in this instance or not.
If you use 'view_results'. all that data has been transformed into html, so its harder to use to test your variable against.
example:
http://yoursite.com/admin/page/1/testing-how-the-stuff-gets-here
see screenshot for all the events that fire and how many times they fire for that one url load.
a listener on any of them might give you more fine grained options if you find yourself needing more control.