Hello, i want to unset the $styles var, and add my own css style.
I'm trying this in template.php into the mytheme_page_preprocess function

<?php

function basic_preprocess_page(&$vars, $hook) {
unset ($vars['styles']);
$vars['styles'] = $var['styles'] = drupal_add_css(path_to_theme() .'/css/file.css', 'theme');
}

?>

But I get nothing.

Thanks

Oskar

Comments

mm167’s picture

..but why u want to delete the css in php?

why not remove the css from drupal folder?
or disable them by login as administer?

oskar_calvo’s picture

Hello mm167.

I'm working in a theme to blackberry and iphone. after checking how those stuff works, my idea is:
Delete all the css,
build a theme for blackberry
build a theme for iphone.

I cannot delete the css from the folders because some people will see the intranet with computer, but other with those stuffs.

Thanks.

Oskar

RWWood’s picture

You can override any core or module stylesheet by copying it to your theme folder and then adding it into your .info file like:

stylesheets[all][] = css/book.css

Then you make the changes you want in the copy that's in your theme directory. If you don't want any of the styles in a particular .css file, follow the above, but leave the style sheet blank, ie. an empty .css file.

Check out http://drupal.org/node/171209

Hope that helps.