There are a couple of things to try:
Put a link on the page back to itself and pass a variable called
"printformat"  Then wrap the contents of what you want printed on the page
in an if clause, if the printformat variable is true.  Exclude the
information that you do not want to show up.

e.g.
<cfparam url.printformat = false>

 <a href="#cgi.script_name#?printformat=true">Click here for printer
friendly format</a>

<cfif NOT printformat>
This will not show up on the page!
</cfif>

If you are using IE only, then you can also put a stylesheet trick to print
a different page when they go to print:
<link rel=alternate media=print
href="<cfoutput>#cgi.script_name#?printformat=true</cfoutput>">

----- Original Message -----
From: "Brandon Wood" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 2:29 PM
Subject: Suggestion for Print This Page...


> Suggestions, Please:
>
> I am having a little bit of a problem coming up with the best way to offer
a
> Print This page template, that will include a template and its content
> without being within the surrounding site code - using something like
> '#getfilefrompath(cgi.script_name)#' and serve up the main or middle
content
> of the page within a printable page.
>
> I have tried a few things like passing a URL string through to a
> "no_app/print_page.cfm" and try to include the template URL in the print
> template, but, of course, it won't let me pass variables into the
> <CFINCLUDE> tag...just the page name.  But I need to pass in a url like
this
> which points to specific content that I get out of a database:
> http://www.provere.com/index.cfm?sa=4&stid=3&scid=6&p=&pt=Contact
>
> Any help would be appreciated, as I am at wit's end trying to figure out
the
> easiest way to accomplish this...and then have a "Print this Page" link of
> any and every page of the site.
>
> Thanks a ton in advance,
> Brandon Wood
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to