From the Zope Digest:
Today's Topics:
1. Re: Two Zopes [NEWBIE] (Lennart Regebro) 2. Printable Page Question (Vid Bijelic)
Message: 2 Date: Mon, 17 Dec 2001 09:12:44 -0800 (PST) From: Vid Bijelic <zoops4@yahoo.com> To: zope@zope.org Subject: [Zope] Printable Page Question
Hi,
How to get content of the page you are on (DTML Document)?
I want to make a printer friendly page without navigations and images. The page contains dynamic text generated from the database so it is different every time. Something like Printable page on zope.org (I tried to view_source of zope.org printable page but couldn't)
Vid
I took the idea from the pages of zope.org a long time ago. In your standard header: <dtml-if pp> < Material that you want as header for the printable page > <dtml-else> < Material you want on your ordinary page, including navigation and images, but not the principal content.> In my case, the ordinary page is a table with only two elements in the main row. The first element, the navigation, is defined here, as is the opening <td> for the second element. The printable page will contain only the second element (but not in a table). </dtml-if> In your standard_footer: <dtml-unless pp> </TD></TR> #If pp is "true," there is no table defined <TR><BR> #and no link to the printable page <TD><p><dtml-var ZopeAttributionButton></p> </TD> <TD> <A HREF="<dtml-var URL>?<dtml-if QUERY_STRING> <dtml-var QUERY_STRING>&</dtml-if>pp=1"> Printable Page (without the Navigation Guide) </A></TD> </TR> </TABLE> </dtml-unless> </BODY></HTML> Hope this helps. Al -- Albert Kinderman California State University, Northridge Department of Systems and Operations Management