Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-02-03 01:08:58

ruminator
Member
From: Carson City, NV
Registered: 2005-02-01
Posts: 57
Website

Printing stylesheet

Has anyone implemented a printing stylesheet to be used when printing articles from the system?

I’m thinking something like what is discussed on A List Apart <a href=“http://www.alistapart.com/articles/printyourway/”>www.alistapart.com/articles/printyourway</a> or <a href=“http://www.alistapart.com/articles/goingtoprint/”>www.alistapart.com/articles/goingtoprint</a>?

I’d like to be able to manage the printing stylesheet from within TP as well as the display stylesheet. Someday I’ll want to print a bunch of my articles, or my kids will want them as a sort of family heritage. I’m just thinking ahead.


Search is your friend… Think before writing…

Offline

#2 2005-02-03 01:33:18

smurfgasm
New Member
Registered: 2004-09-21
Posts: 6

Re: Printing stylesheet

Not yet, but I intend to do exactly that in the week or so as part of a bigger re-design.

The amount of articles I print out now I realised how useful it is.

Now all I need it articles worth printing :)

Offline

#3 2005-02-03 01:39:07

ruminator
Member
From: Carson City, NV
Registered: 2005-02-01
Posts: 57
Website

Re: Printing stylesheet

Any tricks that you can post would be greatly appreciated!


Search is your friend… Think before writing…

Offline

#4 2005-02-03 01:42:52

e-man
New Member
From: Antwerp, belgium, Europe
Registered: 2005-01-12
Posts: 4
Website

Re: Printing stylesheet

Why not simply add a line to your page templates?

this one:

<code><link rel=“stylesheet” href=”<path_to_your_print_stylesheet />” type=“text/css” media=“print” /></code>

should do the trick.

Last edited by e-man (2005-02-03 01:45:09)


Peace,

Erwin.

Offline

#5 2005-02-03 06:31:05

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Printing stylesheet

Add a new stylesheet named “print” and on the head of your page template put the following:

&lt;link rel="stylesheet" media="print" href="&lt;txp:css n="print" /&gt;" type="text/css" /&gt;

Offline

#6 2005-02-03 09:30:16

e-man
New Member
From: Antwerp, belgium, Europe
Registered: 2005-01-12
Posts: 4
Website

Re: Printing stylesheet

Where the n stands for name then I suppose?
Can you do this for more stylesheets? (for instance a separate handheld stylesheet)


Peace,

Erwin.

Offline

#7 2005-02-03 09:39:45

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Printing stylesheet

Sure, n stands for name. You can specify as many alternate stylesheets as you want this way.

Offline

#8 2005-02-03 12:06:02

ruminator
Member
From: Carson City, NV
Registered: 2005-02-01
Posts: 57
Website

Re: Printing stylesheet

That’s exactly what I was looking for. Thank you.


Search is your friend… Think before writing…

Offline

#9 2005-02-03 13:06:05

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: Printing stylesheet

Or if you don’t want to muck about with a separate stylesheet you can always put an @media rule in your CSS to specify print styles. Either way’s good.


You cooin’ with my bird?

Offline

#10 2005-02-03 13:08:39

ruminator
Member
From: Carson City, NV
Registered: 2005-02-01
Posts: 57
Website

Re: Printing stylesheet

<Scrambles around for reference book> That’s new to me. I learn something new about this every day!


Search is your friend… Think before writing…

Offline

#11 2005-02-04 01:04:23

davor
New Member
Registered: 2004-07-07
Posts: 7
Website

Re: Printing stylesheet

this is how I got it working for me – agrees with previous post

<pre>
<link rel=“stylesheet” type=“text/css” href=”<txp:css />” media=“screen, tv, projection” />
<link rel=“stylesheet” type=“text/css” href=”<txp:css n=“print” />” media=“print” />
</pre>

Last edited by davor (2005-02-04 01:07:29)

Offline

#12 2005-02-14 19:59:44

smurfgasm
New Member
Registered: 2004-09-21
Posts: 6

Re: Printing stylesheet

Yep I have this working now. I also used display:none to get rid of the navigation and a few other things.

I can’t get the links to print out instead of just showing it as underline. I think this just works in Mozilla but it’d be nice to see. So it looks a little like anything you try and print from sitepoint.com (although it looks like they use a different file entirely)

Offline

Board footer

Powered by FluxBB