[Zope] Printer Friendly page?

Mike Renfro renfro@tntech.edu
Thu, 20 Jun 2002 13:41:51 -0500


On Thu, Jun 20, 2002 at 11:54:07AM -0400, eric.n.dunn@bankofamerica.com wrote:

> Does anyone know how to set up dtml docs or methods to headers and footers
> form a document.
> example: http://zopeserver:8080/OPS/content/testNewsItem9/testNewsItem9?pp=1

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>

-- 
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- renfro@tntech.edu