Jump to content

Edit History

Zohaib-fk

Zohaib-fk


Post Updated

Hi,

I have added folders in my module views/css and inside module php wrote below code.
 

$this->context->controller->addCSS($this->_path.'views/css/cssfilename.css');

This includes css file when I load my module in front-office.

Another way to do it like below function in module php file.
 

PrestaShop Tutorials Videos [How to do Tasks]

https://www.prestashop.com/forums/topic/907438-prestashop-tutorials-videos-how-to-do-tasks/

 

public function hookHeader ($ params)
{
     $this->context->controller->addJS($this->_path.'views/js/jsfilename.js');
     $this->context->controller->addCSS($this->_path.'views/css/cssfilename.css');
}
Zohaib-fk

Zohaib-fk

Hi,

 

I have added folders in my module views/css and inside module php wrote below code.
 

$this->context->controller->addCSS($this->_path.'views/css/cssfilename.css');

This includes css file when I load my module in front-office.

Another way to do it like below function in module php file.
 

public function hookHeader ($ params)
{
     $this->context->controller->addJS($this->_path.'views/js/jsfilename.js');
     $this->context->controller->addCSS($this->_path.'views/css/cssfilename.css');
}
×
×
  • Create New...