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 __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com
On Mon, Dec 17, 2001 at 09:12:44AM -0800, Vid Bijelic wrote:
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
http://lists.zope.org/pipermail/zope/2000-February/104192.html (a few pages deep in a google search for "site:lists.zope.org printable page") Just make sure that your printable page link uses pp=1 (or something similar) tacked onto the end of the original URL. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
vid, its all in here: http://www.zope.org/standard_html_header/view_source http://www.zope.org/standard_html_footer/view_source you're looking for the <dtml-if pp> (or maybe its still the old syntax: <!--#if pp-->) cheers, g On 17 Dec 2001, at 9:12, Vid Bijelic wrote: From: Vid Bijelic <zoops4@yahoo.com> To: zope@zope.org Subject: [Zope] Printable Page Question Date sent: Mon, 17 Dec 2001 09:12:44 -0800 (PST)
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 couldnt)
Vid
__________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
+-------------------------------------------+ Garry Steedman mailto:gs@styrax.com Styrax Associates http://www.styrax.com/ "The Good Man has no shape." +-------------------------------------------+
From: "Vid Bijelic" <zoops4@yahoo.com>
How to get content of the page you are on (DTML Document)?
The DTML document IS the content.
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)
What you do is that you create an index_html DTML method in the root of the site (don't ever use DTML Documents). The index_html includes all the design. From index_html you also include another DTML Method (you could call it "content" for example) by a <dtml-var content> tag. Now, for each document you want to have on your site, you create a folder. And in each fodler you create a DTML-method called content that contains the content of the page. Now you can easily create another DTML-method in the root called "print", that looks like this: <dtml-var standard_html_header> <dtml-var content> <dtml-var standard_html_footer> Now every page on your site will have a print-view, by just saying /bla/foo/bar/print instead of /bla/foo/bar/index_html Tada!
participants (4)
-
Garry Steedman -
Lennart Regebro -
Mike Renfro -
Vid Bijelic