SHARING & PRINTING INDIVIDUAL PAGE RECORDS

4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 6, 2010   (RSS)

By csdesign - August 5, 2010

On this recipes section, I'd like to Print & Share option to each recipe. How do I go about adding "print this record" (recipe) and "share this record" (recipe) to each record? http://www.aubriericheson.com/recipes.php

Re: [csdesign] SHARING & PRINTING INDIVIDUAL PAGE RECORDS

By Donna - August 5, 2010

Hi there!

What function do you want the print & share buttons to have? Do you want to go to a specific printer friendly page, or just bring up the browsers "Print" function?

To bring up the browsers "Print" function, you can do that with JavaScript:

<a href="javascript:window.print()">Click to Print This Page</a>

What do you want the share button to do?
Donna

--
support@interactivetools.com

Re: [csdesign] SHARING & PRINTING INDIVIDUAL PAGE RECORDS

By Donna - August 6, 2010

Hi there,

You can use the following email link:

<a href="mailto:?subject=<?php echo thisPageUrl() ?>">Email this Page</a>

You can customize that link as much as you want, the bit of PHP in there is what will give the URL of the current page.

To make a printer friendly page, there are a couple of methods you can use. One is to create a new template with all of the non-printer-friendly bits removed.

The second is to simply use a different stylesheet for printing. Take a look at this page for details on how to do that:

http://webdesign.about.com/cs/css/a/aa042103a.htm
Donna

--
support@interactivetools.com