I tried to load additional css with this method '$this->document->addStyle'
At default theme it work perfect but in his template it seems wont load properly.
What may cause this things happen?

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Code: Select all
//load custom css
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template'). '/stylesheet/custom.css');
Code: Select all
if ( isset($this->request->get['information_id']) && $this->request->get['information_id'] == '10') {
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template'). '/stylesheet/pagename.css');
}
Open catalog\view\theme\your_theme\template\common\header.tplxemox wrote:I tried to load additional css with this method '$this->document->addStyle'
At default theme it work perfect but in his template it seems wont load properly.
Code: Select all
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
Users browsing this forum: No registered users and 105 guests