Jump to content

writing my own module - how to include css an js ?


Recommended Posts

have you tried to add 

		$this->context->controller->addCSS($this->_path . 'views/css/css.css', 'all');
		$this->context->controller->addJS($this->_path . 'views/js/bookmark.js');

in this hook?

i remember that in prestashop 1.4 there was a problem with including js css libraries in other hooks than hookHeader

but now, in ps 1.6 you shouldn't have this problem

Link to comment
Share on other sites

have you tried to add 

		$this->context->controller->addCSS($this->_path . 'views/css/css.css', 'all');
		$this->context->controller->addJS($this->_path . 'views/js/bookmark.js');

in this hook?

i remember that in prestashop 1.4 there was a problem with including js css libraries in other hooks than hookHeader

but now, in ps 1.6 you shouldn't have this problem

Yes I have tried that, and I just tried it again, but for some reason it doesnt load them. It only works for me when I put it inside the hookDisplayHeader()

I cant grasp what Im doing wrong, cause i've seen that how it can be done, like you suggest.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...