开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜