Jump to content
Sign in to follow this  
ArtemPitov

[Решено] Как подключить стиль в контроллере

Recommended Posts

Доброго времени суток, подскажите как правильно подключить css в контроллер так что бы "подхватывать тему" из $this->config->get('config_template')

 

пробовал так

$this->document->addStyle('catalog/view/theme/'$this->config->get('config_template')'/stylesheet/myStyle.css');

Share this post


Link to post
Share on other sites

На примере контроллера карточки товара(скрипт+стиль)
 

$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js');
$this->document->addStyle('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css');

Share this post


Link to post
Share on other sites

блин, а точно! Можно и к скриптам добавить. Спасибо!

Share this post


Link to post
Share on other sites

"Точки" забыли

$this->document->addStyle('catalog/view/theme/'.$this->config->get('config_template').'/stylesheet/myStyle.css');

Share this post


Link to post
Share on other sites

во, спасибо!, про конкатенацию постоянно забываю  :-)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.