drupal 7 omega css

Events happening in the community are now at Drupal community events on www.drupal.org.
badge's picture

Adding a CSS file based on content type

I've created an omega subtheme, and am trying to add a CSS file only for a specific content type (confusingly called `problem'). I've tried to get to grips with the preprocess-html.inc file (I think this is what I need), but have had no you writing a suitable THEME_preprocess-html function (*trying* to use drupal_add_css).

At the moment I've butchered the html.tpl.php file thus:


<?php
if(isset($classes_array[7])) : if($classes_array[7] == 'node-type-problem'):
?>

@import url("../css/menu.css");

Read more
Subscribe with RSS Syndicate content