Page 1 of 1

Print button

PostPosted: Thu Aug 27, 2009 9:28 am
by Logfather
I know it's a bit old fashioned but how would one go about to make a 'print button'. This means there's a button (o rly?) and if you press it an entry opens in a printer friendly version (without layout bs, just text and maybe images) so people can print it out. Personally I would like to offer this to visitors of my blog... Any thoughts on this one?

Re: Print button

PostPosted: Mon Sep 07, 2009 11:46 am
by hansfn
Code: Select all
[[ link text="Print" title="Printer friendly version of this page" query="te=somedir/entrypage_print.html" ]]

where the printer friendly entry page template is "pivotx/templates/somedir/entrypage_print.html". Probably also requires that you have added "allow_template_override" with value 1 in the advanced configuration.

Re: Print button

PostPosted: Tue Dec 22, 2009 9:03 am
by localhost
By using a special style sheet for print it almost always unnecessary to have a special template to print your page. My print style sheet looks like this:
Code: Select all
#header,
#menu,
#entrynav,
.gadentry,
object,
.commentform,
#sidebar {
    display: none;
}

.pivotx-image {
    float: left;
    margin-right: 10px;
}

.date {
    font-size: 80%;
}

h1 a {
    color: black;
    text-decoration: none;
}

The most important stuff is shown at the top: "display: none;". Just hide whatever you don't want.
Including a print style sheet is done by adding the following line to your header, probably the _sub_header.html template:
Code: Select all
<link href="path/to/your/stylesheet/print.css" rel="stylesheet" type="text/css" media="print" />