I'm try to add a style sheet switcher. This requires the following css files to be included on my site. Of note is the "rel" and "title tag.

<link rel="stylesheet" type="text/css" href="styles1.css" title="styles1" media="screen" />

<link rel="alternate stylesheet" type="text/css" href="styles2.css" title="styles2" media="screen" />

<link rel="alternate stylesheet" type="text/css" href="styles3.css" title="styles3" media="screen" />

In theme.info. I see there are css files defined. How would i add these attributes.

stylesheets[all][] = common/css/small.css
stylesheets[all][] = common/css/medium.css
stylesheets[all][] = common/css/large.css

Since Drupal will use CSS aggregation (and doesn't have support for adding extra attributes via the info file or drupal_add_css), you will have to print out the style sheets yourself. This can be done with theme functions or by creating the markup in the html.tpl.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.