Jump to content

Recommended Posts

hi advancers

 

i duplicate a module and each copy use the same javascript and images .but each one loads this files seperatly from its module folder. i want both of them use global js and images folder , for example theme js folder or main js folder.(for speed up the site load time )

 

module load js files in module.php with this line :

 

<script type="text/javascript" src="'.($this->_path).'assets/script.js'.'"></script>';

Tools::addJS( ($this->_path).'assets/script.js', 'all');

$this->context->controller->addJS(($this->_path).'assets/script.js', 'all');

 

if i want to load js file from theme js folder and main ps js folder which code i must write instead of src="'.($this->_path).'assets/script.js'.'" and addJS(($this->_path).'assets/script.js', 'all')

 

 

and totaly how can i call theme folders in module.php files .

 

thank you

Edited by the_raven (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...