On Thu, Jun 20, 2002 at 01:41:51PM -0500, Mike Renfro wrote:
Untested (and someone else may contribute the ZPT version), but I'd think if you put a bit of logic in your standard_html_header and footer, it'll work fine. The footer might not even need to be modified, depending on your layout. Something similar to:
standard_html_header ====================
<dtml-if "pp==1"> <!-- Here's the html header stuff for a printable page --> <body bgcolor="#ffffff" text="#000000"> <dtml-else> <!-- Here's the html header stuff for a non-printable page --> <body bgcolor="#000000" text="#ff0000" background="/someillegiblewatermark.jpg"> </dtml-if>
Please keep your replies on list, since I'm not the ultimate authority, and have occasionally even been completely wrong in the past. You're getting an error because my untested code didn't entirely work. It doesn't take into account what happens if the pp variable isn't defined at all. The original version of this is at http://www.zope.org/standard_html_header/view_source , but if you use <dtml-if pp> instead of what I used before, you should be ok. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu