PHP Get CSS Theme path

Permalink
I am trying to load some css form the them dir and I don't know php and my dev's aren't online for a few hours how do I do this correctly...

$this->addHeaderItem($html->css('<?php echo $this->getThemePath() ?>/css/forms.css'));

 
Mnkras replied on at Permalink Reply
Mnkras
for what your doing i would use a custom template
aaron replied on at Permalink Reply
This is going in a block but I want the form css stored with the theme so it will match.
mdzoidberg replied on at Permalink Reply
mdzoidberg
From where are you trying to load this? is it on one of your template files?

A css from your template directory;

<link href="<?php echo $this->getThemePath()?>/css/mystyle.css" rel="stylesheet" type="text/css" media="screen" />
aaron replied on at Permalink Reply
sorry I am trying to do it form the controller...

function on_page_view() {
         $html = Loader::helper('html');
         $this->addHeaderItem($html->css('/css/validationEngine/validationEngine.jquery.css'));
         $this->addHeaderItem($html->css('/css/datePicker/datePicker.css'));
         $this->addHeaderItem($html->css($this->getThemePath()/css/forms.css'));
         $this->addHeaderItem($html->javascript('/js/validationEngine/jquery.validationEngine.js'));
         $this->addHeaderItem($html->javascript('/js/validationEngine/jquery.validationEngine-en.js'));
         $this->addHeaderItem($html->javascript('/js/datePicker/date.js'));
         $this->addHeaderItem($html->javascript('/js/datePicker/jquery.datePicker.js'));
      }
mdzoidberg replied on at Permalink Reply
mdzoidberg
Maybe try this?

$this->addHeaderItem($html->css(DIR_FILES_THEMES.'/yourtheme/css/validationEngine/validationEngine.jquery.css'));
aaron replied on at Permalink Reply
Thanks but I am trying to get it to switch themes, that pulled the server path not the web root

/var/www/vhosts/dealercontrol.net/subdomains/c5/dev/themes

I am trying to load the css file on the select themes directory.
mdzoidberg replied on at Permalink Reply
mdzoidberg
This should pull the base url BASE_URL