prestashop_newuser Posted September 28, 2013 Share Posted September 28, 2013 (edited) Hi, In prestashop modules inside function _displayForm() I want to add my modules css file. For that I have my code like this $this->_html .= ' <link rel="stylesheet" href="../modules/mymodulename/css/styles.css" /> <script src="../modules/mymodulename/js/custom.js" type="text/javascript" /> '; It is working fine (as it is absolute path) but I want to know is there any good and standard method to get all the css, js and image path ? Edited September 28, 2013 by prestashop_newuser (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2013 Share Posted September 28, 2013 here is an example: public function hookBackOfficeFooter($params){ $this->context->controller->addJqueryUI('ui.sortable'); $this->context->controller->addJS('js/script.js'); $this->context->controller->addCSS($this->_path.'mystyles.css'); } Link to comment Share on other sites More sharing options...
Recommended Posts