21 Jun
2006
21 Jun
'06
7:22 p.m.
Nedjo Rogers wrote:
@all - the right way to add a custom stylesheet from a module is theme_add_style().
TDobes offers convincing arguments that we should instead use
<?php // Modules should do: drupal_set_html_head(theme('stylesheet_import', base_path() . drupal_get_path('module', 'mymodule') .'/mymodule.css')); ?>
I'm not sure -- someone can check -- but since TDobes wrote that, I think the output of theme_get_style was reversed. I believe this is the case since at one point I'd hacked my template.php on a site to do just that because modules using theme_add_style screwed things up. After an updated, I had to remove that hack; turned out the module was still using theme_add_style.