I want to add an extra stylesheet to my theme for printing.
I found this handbook page on it, but I can't get it to work: http://drupal.org/node/64144
I'm guessing it's out of date.

What's the way to do it on Drupal 5?

Comments

Rowanw’s picture

Two methods I'm aware of are:

In template.php of your theme folder, add the following line (anywhere):

drupal_add_css(drupal_get_path('theme', 'THEMENAME') .'/print.css', 'theme', 'print');

More info: http://api.drupal.org/api/function/drupal_add_css/5

Or, in page.tpl.php add this line in the header (from Garland):

<style type="text/css" media="print">@import "<?php print base_path() . path_to_theme() ?>/print.css";</style>
Rowanw’s picture

Two methods I'm aware of are:

In template.php of your theme folder, add the following line (anywhere):

drupal_add_css(drupal_get_path('theme', 'THEMENAME') .'/print.css', 'theme', 'print');

More info: http://api.drupal.org/api/function/drupal_add_css/5

Or, in page.tpl.php add this line in the header (from Garland):

<style type="text/css" media="print">@import "<?php print base_path() . path_to_theme() ?>/print.css";</style>