15 November 2003

With generousity from CSS2, and also thank to Nimbus for suggestion, I replace Printed Version from my Coret Moret and #direktif. It is a simple step: all I have to do is providing stripped version from original, screen-oriented stylesheet. Because MT's default template consists of main block such as links for my sideblog and comments-head for commenting part, I can easily hide them in printer stylesheet,

.links, .comments-head { display: none; }

I provide printer feature only in Individual mode, so inside its template, I made this modification

<link rel="stylesheet" href="<$MTBlogURL$>css/styles-site.css" type="text/css"
media="screen" />
<link rel="stylesheet" href="<$MTBlogURL$>css/styles-printer.css" type="text/css"
media="print" />

The document has two separate stylesheets now, each for specific media.

This solution does not provide separate document for printer version, instead it gives proper view (guided by stylesheet) for printer. To see the result, and not by messing printer, Print Preview menu in browser can be used.

Finally, to provide link for visitor to print, JavaScript will help,

<a href="javascript:this.print()">Print this page</a>

No comments: