Additional scripts and styles
All styles and scripts loaded in head controller. It useย documentย class. If your extension need to load style/script useย documentย class
To add stylesheet use
public function addStyle(array($href, $rel = 'stylesheet', $media = 'screen'))
To add script use
public function addScript($script)
For example you need to add css and js
// RDIR_TEMPLATE - points to template directory $document = $registry->get(โdocumentโ); $document->addStyle(array(RDIR_TEMPLATE.'stylesheet/some.css')); $document->addScript(RDIR_TEMPLATE.'javascript/some.js'); // in controller you can use this $this->document->addStyle(array(RDIR_TEMPLATE.'stylesheet/some.css')); $this->document->addScript(RDIR_TEMPLATE.'javascript/some.js');