[development] Switching themes in modules

Nedjo Rogers nedjo at islandnet.com
Thu Jun 22 04:46:08 UTC 2006

> @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

// Modules should do:
drupal_set_html_head(theme('stylesheet_import', base_path() . 
drupal_get_path('module', 'mymodule') .'/mymodule.css'));

see http://drupal.org/node/52508#comment-79259 

More information about the development mailing list