[Zope] print functon?
Tino Wildenhain
tino@wildenhain.de
Fri, 20 Jul 2001 19:09:03 +0200
Hi,
--On Freitag, 20. Juli 2001 09:39 -0400 Joel Burton <jburton@scw.org> wrote:
> On Fri, 20 Jul 2001, Tino Wildenhain wrote:
>
>> Hi Ismet,
>>
>> define "printable" :-)
>>
>> Regards
>> Tino
>>
>> --On Freitag, 20. Juli 2001 20:05 -0700 Ismet Dere
>> <ismet@fiducia-china.com> wrote:
>>
>> > hello all,
>> >
>> > howto create a printable version of current document in zope, is there
>> > any DTML/Python script available for this?
>
> On our site, we have a "Print" button that does the following:
>
> 1) Calls the page you're on, with "?pp=1" at the end
>
> 2) Our standard_html_header and standard_html_footer check for pp=1,
> and if so, show standard_print_header and standard_print_footer.
>
> standard_print_* show heads & footers that are simplified, lack
> complex table stuff, etc. They also use a different CSS file
> that is more print-oriented.
>
> 3) The link to the Print page uses target=_blank so that the printable
> version can be closed, and the original page is still there.
Nice, but if you drop the idea of documents or at least use
a ZClass for them, you can add a method index_html for
displaying them as usual and print to display them for printers.
This would show the URL yourpage/print vs. yourpage?pp=1
And enables you to still pass other arguments to the page.
(As sideeffect not every page has to have <dtml-var standard_html_header>
and stuff in it)
Regards
Tino
> You can try it out at http://scw.org.
>
>
> Or:
>
> CMF has "skins" so that printable is just one look for a page, so this can
> be a prebuilt solution. CMF, however, seems to completely lack coherent
> documentation. ;-)
>
> --
> Joel Burton <jburton@scw.org>
> Director of Information Systems, Support Center of Washington
>