kornett Posted September 20, 2014 Share Posted September 20, 2014 Hi! Currently I'm using the following to add css to my module.... public function hookDisplayHeader() { $this->context->controller->addCSS($this->_path.'css/mymodule.css', 'all'); } But I noticed that the CSS is added to ALL pages of prestashop, is that what the "all" in the above line means? Since it is causing compatibility issues with other modules, I'd like to add it just where my module is used. Thanks, Link to comment Share on other sites More sharing options...
vekia Posted September 20, 2014 Share Posted September 20, 2014 and where your module is used? it can be achieved with one simple if condition, but everything depends on where you want to display your module. Link to comment Share on other sites More sharing options...
kornett Posted September 21, 2014 Author Share Posted September 21, 2014 I'm using an independent page using a url like this: http://www.site.com/index.php?fc=module&module=Mycommerce&controller=details So my question is, can I display something in the header or footer of prestashop but only for 1 page? Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2014 Share Posted September 21, 2014 you've got FrontController for this? if so, you can define exceptions for these controllers under modules > positions (click edit near module on selected hook) Link to comment Share on other sites More sharing options...
kornett Posted September 21, 2014 Author Share Posted September 21, 2014 That worked perfect, thanks man! Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2014 Share Posted September 21, 2014 you're welcome :-) glad to hear that i could help a little i marked this topic title as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now