开发者

How can I unset css files in Drupal 6?

开发者 https://www.devze.com 2023-01-17 12:50 出处:网络
How can开发者_Go百科 I unset css files in Drupal 6 ? i.e. I want to unset default.css system.css and system-menu.css

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

精彩评论

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

关注公众号