[opencms-dev] >1 template per content item ???

Stephan Hartmann hartmann at waehrisch-feykes.de
Wed Nov 20 08:05:12 CET 2002


Hi Mark,

you simply have to define in all the needed templates a second template 
section but with a name attribute:

<TEMPALTE name="printversion">
...
</TEMPLATE>

now your link in your normal template section for the print version should 
look like this:
<a href="]]><method 
name="getUriWithParameter">cmsframe=printversion</method><![CDATA[" 
target="_blank">print version of this page</a>

the result will be something like this:
<a href="/opencms/opencms/index.html?cmsframe=printversion" target="_blank">

now if you call a page with this cmsframe parameter opencms will look in all 
templates for a template section of this name. If it doesn't find one it will 
use the unnamed template section.
Note: if you create in your page another text body with the WYSIWIG editor 
and name it "printversion" this body will be used also.

Bye,
Stephan


Am Mittwoch, 20. November 2002 02:14 schrieben Sie:
> Hi All,
>
> Our client would like to have a "print this page" link on each page of
> their website - but they don't want this to simply send the current page to
> the printer, but to print a version of the page without the "decorations"
> (header block, side navigation, footer).  (We do not want to use Frames).
>
> Has anybody done something like this, or produced a "Printer Friendly" page
> system?    I can't see how to do this without duplicating content (which I
> don't want to do) and specifying 2 templates.
>
> Thanks,
> Mark
>
> Mark Foley
> __________________________________________________
> CSC
> 212 Northbourne Ave, Braddon, ACT 2612
> Ph: +61-2-62468487    Email: mfoley5 at csc.com.au
> ---------------------------------------------------------------------------
>-------------
>
> This email, including any attachments, is intended only for use by the
> addressee(s) and may contain confidential and/or personal information and
> may also be the subject of legal privilege. Any personal information
> contained in this email is not to be used or disclosed for any purpose
> other than the purpose for which you have received it. If you are not the
> intended recipient, you must not disclose or use the information contained
> in it. In this case, please let me know by return email, delete the message
> permanently from your system and destroy any copies.
> ---------------------------------------------------------------------------
>-------------

-- 
Stephan Hartmann

Währisch & Feykes GmbH
Gustav-Adolf-Str. 5
47057 Duisburg
Tel. 0203 / 373 070
Fax 0203 / 376 766
hartmann at wfnetz.de

------------------------------------------------------
Ausschlusserklärung (Disclaimer):
Über das Internet versandte E-mails können unter fremden Namen erstellt oder 
manipuliert werden. Aus diesem Grund enthalten unsere mit E-mail verschickten 
Nachrichten grundsätzlich keine rechtsverbindlichen Willenserklärungen.



More information about the opencms-dev mailing list