By jjkiesch on
i read in the handbook about overriding module stylesheets by including them in your theme and adding them in .info but what if only want to override it on a specific page? i'm guessing it would need to be drupal_add_css somewhere in template.php but i'm not sure which function to call.
Comments
Depending on your theme, you
Depending on your theme, you may have body classes you can use for selectively styling certain pages.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
I know you can use body
I know you can use body class selectors, but there's gotta be a way better than this. What if you have a single page on your site with lots of custom CSS, and you don't want to clog up your main styles.css file. It seems like a waste to load all this extra style information if it is only applicable to a single page on the site. The styles loaded by the theme's .info file are loaded into every single page.
Other than creating a custom tpl.php file, is there a function that will let you include a css file per path? Or maybe per content type?
Merry Christmas!
I haven't done this myself,
I haven't done this myself, but with Drupal 6 there are the new phptemplate_preprocess functions. You could perhaps use a conditional statement in phptemplate_preprocess_node to add a css page.
------------------------------
http://fraggles.artsci.wustl.edu (Drupal user documentation and development blog)
I found this, not a complete
I found this, not a complete solution posted but you could ask for a follow up - http://drupal.org/node/271818
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.