2014-03-25, 18:27:52
The easiest way would be to just put the styles into the template itself, e.g.:
[code]
<?php if (return_special_field('color')) == 'red') { ?>
<style type="text/css">
body { background-color: red; }
</style>
<?php } ?>
You could also include different css files depending on a page field.
Or you could use lessPHP to write .less files instead of .css files and pass parameters (based on special fields) to it from your template. For each combination of parameters you can then compile and cache the css file and include the correct one in your template.
[code]
<?php if (return_special_field('color')) == 'red') { ?>
<style type="text/css">
body { background-color: red; }
</style>
<?php } ?>
You could also include different css files depending on a page field.
Or you could use lessPHP to write .less files instead of .css files and pass parameters (based on special fields) to it from your template. For each combination of parameters you can then compile and cache the css file and include the correct one in your template.