22 Jun
2006
22 Jun
'06
1:22 a.m.
Hi, 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')); ?>
If you are using this from hook_menu() do not use the theme() as it will initialise the theme, and you will not be able to change it. Gordon.
see http://drupal.org/node/52508#comment-79259
!DSPAM:1000,44997ed5176845696618876!