1. Print style sheets for the xtemplate/pushbutton and chameleon themes.
2. Added the link tags to themes to call the sheets when printing.

This will allow nice printing for the core themes without having to go to a 'printer friendly page'.

CommentFileSizeAuthor
#1 chameleon-correction.diff867 bytesNick Wilson
print.diff12.96 KBNick Wilson

Comments

Nick Wilson’s picture

StatusFileSize
new867 bytes

Ooops. Small correction made to the [link] tag in chameleon.theme

dries’s picture

If this is considered to be a good idea, we might as well make this global to all themes. Thoughts?

Nick Wilson’s picture

I'm up for it.

I'll even do the individual sheets if you like, if we can work out which ones need a specific sheet and which ones dont...

Nick

kika’s picture

1) build a unified print stylesheet in misc/print.css
2) overload print css in custom themes, if needed

Nick Wilson’s picture

Yeah, we talked about this on teh devel list.

Whearas it's a viable solution, the fact is that most themes would need to be overloaded which means a minimum of 3 GET requests for stylesheets.

I think I like the soluttion talked about on the list more: Individual sheets for core themes and then it's down to the /contributions theme designers to decide if they'd like their themes to support print.

Also, the core themes change from time to time, what works today may not work tommorow, far better to have a little replication but much tighter control IMO.

Nick

Nick Wilson’s picture

tap tap tap...... is this thing on?

Should I be working on this or not?

Cheers...

Nick

killes@www.drop.org’s picture

Setting this to "patch" to increase awareness.

I'd welcome the inclusion of css print styles with Drupal.

Steven’s picture

The chameleon patch seems to be missing a print-media identifier for the print stylesheet. Also, you should avoid diffing the CVS directories.

Perhaps you should talk to adrian/vertice about PHPTemplate. He is unifying theme settings and style configuration. Print stylesheets seem a perfect inclusion is that.

I'm setting the version to cvs though. This seems a new feature.

dries’s picture

There is a generic misc/print.css. Can't we update the core themes to use that instead?

Nick Wilson’s picture

Well, there are good reasons not to. But they were all discussed at lenght on drupal-devel list. Anyone know how to reference a thread on that list?

It was quite an involved discussion and I'd rather not have it twice ;-)

Nick

Nick Wilson’s picture

...a bit of that detail in msg5 above...

Nick

Anonymous’s picture

Bèr Kessels’s picture

We now have a print.css, in core. We should look at separate themes if they use it and file a bug/feature per theme. Closing this.

akuma’s picture

well, i don't know about core changes or anything like that, but i recently wrangled a simple module to create and apply a custom print.css file. it works for me (running phptemplate with a modified version of heilemann's kubrick theme).

printstyle.module:

<?php

function printstyle_menu() {
  drupal_set_html_head('<link rel="stylesheet" type="text/css" href="'. drupal_get_path('module', 'printstyle') .'/print.css" media="print" />');
}

?>

included it under 'modules/printstyle' along with my custom 'print.css'. then all i did was edit the 'theme_stylesheet_import' function in includes/theme.inc to specify media="screen" instead of "all".

a quick-fix, i know... but whatever works, eh? ;)