Help - Search - Members - Calendar
Full Version: "Email this" and "Print this" option
Movable Type Community Forum > Additional Resources > Tips and Tricks
ldabney
I am experimenting with different ways of accomplishing this.  Anyone have an easy way of setting this up?  I want to be able to have a printer and email icon for these functions also that when clicked perform the function.
nothingcrat
http://javascript.internet.com/page-detail...ndow-print.html



Question though.. is this really neccessary? Often I've seen links to the "printable version" of a page.. but doesn't every browser already have it's own print button?

Anyway, I hope that helps.. I guess you would have to do some sort of PHP to set up an email form.

Good luck.
stepan
QUOTE
Question though.. is this really neccessary? Often I've seen links to the "printable version" of a page.. but doesn't every browser already have it's own print button?

I agree that "Print this page" links/buttons are often an unneccessary convenience.  However, a "printable version" of a page sometimes makes sense.  A page that looks good in your browser often looks lousy printed out, so it may make sense to design a special - simplified - look for printing.

In general, a "printable version" should be black text (in a serif typeface) on a white background - without gratuitous graphics, links, etc.  Oh, and stay away from background graphics.

Here's an example of a regular page and the corresponding printable version.
ldabney
Yes the print button is available in browsers but sometimes the page gets cut off on the right or left side so that text is missing.  I want to create a page that can be printed so that it looks nice and clean.
medic119
nothingcrat:  The reason you have printable versions of a page is to make sure its styled so that when it prints it can be read.

Sometimes font colors, or other options (esp when using b & W printers) don't always print exceptionally readable.  Then there are links.  When you print a page you can see the link, but not see where it goes without special formatting.  Soprint pages often time list the URLS next to the hyperlink, or like in my case, as a list at the bottom so people can reference where to go for the links in the page.

As to the original question:
E-mail this answer is here

Print page:
1) Create a new Individual archive Template called Print Friendly.
2) Design the layout of the page as you want it to appear.  Most times addin a simple STYLE attribute to the top and listing the CSS there is simpler than creating a new stylesheet as there will be way less styles.

3) Go to Blog Config/Archives and add it as an individual Archive type.  MAke sure it outputs to a different name than the individual archive.  Mine is print-<$MTEntryID pad="1"$>-<$MTEntryTitle dirify="1"$>.php which outputs as print-00001-title_of_entry.php.

4) rebuild and add the print sheet to your blog.

This is the simplest method for me.  Downside is that every individual archive has two copies of itself, the normal and the print version.  

There are other ways to do this with CSS and such, just search the archives.
nothingcrat
Yeah, I understand the reason behind using a separte printable version (though through the wonders of CSS this shouldn't really be neccesary anymore as you can serve a printer-specific stylesheet). However, I think the idea here was to create a button that would perform the same function as the browser's print button.. not link to a separate printer-friendly version.

Such a button certainly couldn't hurt anything.. I was just pointing out that it could be redundant. No big deal.
medic119
I have my print pages automatically open the print dialog.  Why else would someone open a print page, but to print it.  As far as having the page automatically print, it can't be done.  That function was left out so malicious code couldn't take over your printer and start printing out stuff.  Imagine all those banner ads, et al doing that.

Anyway here is my link to open the printer dialog
CODE
<a href="http://www.your_link.here" onclick="OpenPrint(this.href); return false">Print</a>
kadyellebee
I'm coming into this a bit late, but there is a tutorial here on the MT site for using multiple templates for printer friendly pages. smile.gif

Kristine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.