Re: [SMARTY] Printer Friendly format

From: Date: Wed, 11 Sep 2002 02:00:31 +0000
Subject: Re: [SMARTY] Printer Friendly format
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5959@lists.php.net to get a copy of this message
If you exclusively use CSS to do your layout like a good web developer, then it should be easy to use print media stylesheets to make a page display and print very differently, thus negating the need for printable version links. See this page for advice: http://www.meyerweb.com/eric/articles/webrev/200001.html Not that this is what you were expecting :-) Ben On Tuesday, Sep 10, 2002, at 23:05 Europe/London, Eric C. Pollitt wrote:
How can I implement a "Printer Friendly" format (template) using Smarty? My pages have the following format: <?php require '/home/globalhemp/www/Smarty/Smarty.class.php'; require '/home/globalhemp/www/Poll/booth.php'; $smarty = new Smarty; $smarty->compile_check = true; $smarty->debugging = false; $smarty->assign("TITLE", "Title information here"); $smarty->assign("DESCRIPTION", "Short description here"); $smarty->assign("KEYWORDS", "some, keywords, here"); $smarty->assign("AUTHOR", "Author, Arthur, Awefur"); $smarty->assign("CONTENT", ' <P CLASS="size2">Lots of HTML content goes here.</P> '); $smarty->display('/home/globalhemp/www/Smarty/templates/index.tpl'); ?> Example Web page using Smarty: http://globalhemp.phpwebhosting.com/News/2002/August/transylvanian_trousseau .html NOTE: Current "Print this page" is a slow script that I would like to replace with something that I'm positive Smarty can do MUCH better. Basically, what I want to do is to use an alternative template for $smarty->display. I would also require that the "Print Friendly" page includes all content within $smarty->assign("CONTENT", ""); most importantly images. Too many "Print Friendly" scripts out there assume that all files are in the same directory as the script and don't properly write paths to the appropriate images, etc. The script that I'm using now does this correctly, but uses Python. Thanks, Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ Those who don't like thinking should at least rearrange their prejudices from time to time. -- Luther Burbank, 1849-1926 --Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
(q) Ben Godfrey? (a) Developer and Designer, See http://aftnn.org/ for details

« previous php.smarty.general (#5959) next »