How can I unset css files in Drupal 6?
How can开发者_Go百科 I unset css files in Drupal 6 ?
i.e. I want to unset default.css system.css and system-menu.css
thanks
The Stylestripper module lets you selectively deactivate stylesheets from Drupal core.
Add this to your template.php file:
function yourtheme_preprocess_page(&$vars){
$css = drupal_add_css();
unset($css['all']['module']['modules/system/system.css']);
unset($css['all']['module']['modules/system/defaults.css']);
unset($css['all']['module']['modules/system/system-menus.css']);
unset($css['all']['module']['modules/node/node.css']);
unset($css['all']['module']['modules/user/user.css']);
$vars['styles'] = drupal_get_css($css);
}
See the drupal_add_css function.
精彩评论