Themes - php in main.css

Permalink
Hi All,

I would like to use some variables in my main.css so i changed the the name of the file to main.css.php and added the following to the top of the file:

<?php
header("Content-type: text/css");
$bg_color = "#ccc";
?>

In my header I have the following line:

<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStyleSheet('main.css.php')?>" />


This works on one of my other sites but I can't get it work in Concrete5. Any ideas?


Cheers,
Mårten

 
12345j replied on at Permalink Reply
12345j
try this
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getThemePath();?>/main.css.php" />
Mnkras replied on at Permalink Best Answer Reply
Mnkras
or use LESS
martenjansson replied on at Permalink Reply
Thank you!

Using LESS now. Works like a charm.


Cheers