Jump to content

Help about Tools::addCSS function


Recommended Posts

  • 1 month later...
  • 4 months later...
i use this code for add my CSS link file to site header but not work
 public function hookheader($param) { global $smarty; Tools::addCSS($this->_path.'superfish-modified.css', 'all'); } 

complete module file in attachment please help me :( :( :(

 

the post is old but if you have to be helpful set the hook of the module with this line ! $ this-> registerHook ('header') example:

 

public function install()

{

if (!parent::install() || !$this->registerHook('home') || !$this->registerHook('header'))

return false;

return true;

 

 

 

}

 

 

then add this

 

public function hookheader($param)

{

global $smarty;

Tools::addCSS($this->_path.'mymodules.css', 'all');

}

with this system, the module goes to get the css in the template directoy example :

 

themes/mytemplate/css/modules/mymodules/mymodules.css

 

If the module has pictures put the image folder in the same directory example:

 

themes/mytemplate/css/modules/mymodules/img/

 

I hope to be helpful goodbye

greetings from italy.

Edited by prestaitalia (see edit history)
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...