-
Notifications
You must be signed in to change notification settings - Fork 0
Javascript and Css files support
coreframework edited this page Sep 14, 2011
·
1 revision
That should be possibility to have a way to attach CSS and Javascript files to a particular module. Css files registration
Requirements to register custom css:
-
Create .yml file with css package description
stylesheets: base: - forms.css -
Define parameters in plugin's config file
<CssJsConfigPath>Config\asset_packages.yml</CssJsConfigPath> <ImagesPath>Content\</ImagesPath> <CssPath>Content\Css\</CssPath> <CssPack>base</CssPack>
To register JavaScript files in modules follows the instructions below:
-
Define necessary scripts in .yml file (CssJsConfigPath). Section "inner" contains internal plugin's scripts. Section "outer" contains base jquery plugins (make sure that this files are founded in global JavaScript files folder).
javascripts: base: inner: - test.js outer: - jquery.ui.datepicker.js -
Set parameters in plugin's config file:
<JsPath>Content\Css\</JsPath> <JsPack>base</JsPack>