Dynamic Script Loader

Navigation:  Development > MVC (Model View Controller) > View > Theme >

Dynamic Script Loader

Previous pageReturn to chapter overviewNext page

This method helps to load JavaScript and CSS added by Hooks. This area is widely used by Components and Other 3rd party that want to register script from outside of the  MVC development area.

 

There are two common files in below location. As a theme creator you can just copy and past these files that will save other app developers and make your theme standard for all .

 

default_css.phtml
default_js.phtml

 

File location: /development/view/rainbow/common

 

default_css file contain below code:
 
App::Module('Hook')->getHandler('CSS', 'register_css_code', __FILE__, 'display');

 

default_js file contain below code:
 

App::Module('Hook')->getHandler('Javascript''register_Javascript_Code'__FILE__'display');