Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

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


Recommended Posts

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

 

пробовал так

$this->document->addStyle('catalog/view/theme/'$this->config->get('config_template')'/stylesheet/myStyle.css');
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');
Link to post
Share on other sites

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

Link to post
Share on other sites

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

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

Link to post
Share on other sites

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

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

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.