Getting Started
By default, the global api variable for the theme engine is $theme. If this conflicts with an existing variable in your setup, you cna change the global variable in the module's config.
Usage in template & files
You will be able to use the engine to add, remove, sort and output CSS & JS files, for example you might specify the main assets in an array and add them to the styles array. All assets that you add to the Theme Engine's arrays will be able to be combined with ProCache or AllInOneMinify (AIOM+).
The following are the methods available for adding styles and scripts.
addStyle($stylePath)
Adds a single css file to the engine's array of styles. This adds the file to the associative array of styles, and uses the file's basename as the key.
addStyles(array $assets)
Add an array of CSS files to the module.
addScript($scriptPath, $location = 'foot');
Adds a single JS file.
addScripts(array $assets, $location = 'foot');
Add an array of JS files. The items in the array should each represent a valid path to the file relative to the templates root folder.
addScriptExternal($scriptUrl);
Adds a single external URL to the the external scripts array, which will be output to the headAssets() method.
Last updated