I search for this as I know I have seen it on the forums, however the search here does not permit searching for the term “javascript”
What is the standard way to include a javascript file that is required application wide?
I search for this as I know I have seen it on the forums, however the search here does not permit searching for the term “javascript”
What is the standard way to include a javascript file that is required application wide?
There are many ways… You could:
eg Yii::app()->clientScript->registerScriptFile(…)
*reference
You could put this straight into your layout file, or in a component set to autoload in the config file. Or in some event that fires on every browser request (havn’t looked into these)
*reference