Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
Re: Printing stylesheet
Any tricks that you can post would be greatly appreciated!
Search is your friend… Think before writing…
Offline
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
Re: Printing stylesheet
Add a new stylesheet named “print” and on the head of your page template put the following:
<link rel="stylesheet" media="print" href="<txp:css n="print" />" type="text/css" />
VC3 :: weblog :: my wishlist
Offline
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
Re: Printing stylesheet
Sure, n stands for name. You can specify as many alternate stylesheets as you want this way.
VC3 :: weblog :: my wishlist
Offline
Re: Printing stylesheet
That’s exactly what I was looking for. Thank you.
Search is your friend… Think before writing…
Offline
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
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
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