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

Prestel, Marianne prestel at itiv.uni-karlsruhe.de
Thu Nov 21 15:36:23 CET 2002


Hi Stephen,

ultimately all works fine: it was a problem with our own class!!!
Many thanks for your big help!

Bye 
Marianne

-----Ursprüngliche Nachricht-----
Von: Stephan Hartmann [mailto:hartmann at waehrisch-feykes.de]
Gesendet: Donnerstag, 21. November 2002 14:45
An: opencms-dev at www.opencms.org
Betreff: Re: AW: AW: AW: [opencms-dev] >1 template per content item ???


Hi Marianne,

if the complex looking of your page is in your frametemplate where i expect 
it to be, you should create there a second template section for a print 
version with a simple looking. 

bye,
Stephan

Am Donnerstag, 21. November 2002 14:27 schrieben Sie:
> Hi Stephan,
>
> it works! thanks!
> Now I have located the error:
> If I have only one "simpletemplate" as master (inside folder
> /content/templates) as below-mentioned all works fine, but not with my
> structure of frametemplates and contenttemplates.
>
> Regards Marianne
>
> -----Ursprüngliche Nachricht-----
> Von: Stephan Hartmann [mailto:hartmann at waehrisch-feykes.de]
> Gesendet: Donnerstag, 21. November 2002 13:46
> An: opencms-dev at www.opencms.org
> Betreff: Re: AW: AW: [opencms-dev] >1 template per content item ???
>
>
> Hi Marianne,
>
> i suggest you a simple test: crate a template inside /content/templates ,
> lets say simpletemplate with the content:
>
> <?xml version="1.0" ?>
> <XMLTEMPLATE>
> <TEMPLATE>
> <![CDATA[
> <html>
> <head></head>
> <body>
> <a href="]]><method name="getUriWithParameter">cmsframe=print</method>
> <![CDATA[">print version</a>
> </body>
> </html>
> ]]>
> </TEMPLATE>
>
> <TEMPLATE name="print">
> <![CDATA[
> <html>
> <head></head>
> <body>
> Success!
> </body>
> </html>
> ]]>
> </TEMPLATE>
> </XMLTEMPLATE>
>
> now create a page using this template and check if it works.
>
> bye,
> Stephan
>
> Am Donnerstag, 21. November 2002 13:14 schrieben Sie:
> > Hi Mark,
> >
> > thanks for your sample code, but the result is the same: instead of the
> > printversion-template the normal template will be used :( Have I to
> > define something more (except the print template and the link)? We work
> > with version 4.6!
> >
> > Regards
> > Marianne
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mfoley5 at csc.com.au [mailto:mfoley5 at csc.com.au]
> > Gesendet: Donnerstag, 21. November 2002 09:32
> > An: opencms-dev at www.opencms.org
> > Betreff: Re: AW: [opencms-dev] >1 template per content item ???
> >
> >
> > Hi Marianne,
> >
> > This is what I did:
> >
> > I added the following to my Frametemplate:
> >
> > <?xml version="1.0"?>
> > <XMLTEMPLATE>
> > <TEMPLATE>
> > <![CDATA[
> >
> > <html>
> > <head>
> >
> >  ..... (normal page content defined here) .....
> >
> > </BODY>
> > </html>
> > ]]>
> > </TEMPLATE>
> >
> > <html>
> > <head>
> > <script language="JavaScript" src="]]><LINK>
> > <![CDATA[/common/scripts/pagePrint.js]]></LINK><![CDATA["></script>
> >
> > </head>
> >
> > <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="5"
> > marginwidth="5" marginheight="5">
> >
> > <table width="100%" border="0" cellspacing="2" cellpadding="0">
> >   <tr>
> >     <td>
> > ]]><ELEMENT name="body"/><![CDATA[
> >   </tr>
> > </table>
> > <A HREF="#" onClick="pagePrint()">Print this page</A>
> >
> > </body>
> > </html>
> > ]]>
> > </TEMPLATE>
> >
> > </XMLTEMPLATE>
> >
> > ..... then referred to this in a contenttemplate:
> >
> > <?xml version="1.0"?>
> > <XMLTEMPLATE>
> > <TEMPLATE><![CDATA[
> >  ....
> >       <a href="]]><method name
> > ="getUriWithParameter">cmsframe=printversion</method>
> >           <![CDATA[" target="_blank">Print this Page</a>
> >  ....
> > ]]></TEMPLATE>
> >
> > </XMLTEMPLATE>
> >
> > And finally, my (simple) pagePrint.js file looks like this:
> >
> > function pagePrint()
> > {
> >       if (window.print) window.print();
> >       else if (VBS) printIt();
> >       else alert('Your browser does not support this funtion - please
> > print manually');
> >       window.close();
> > }
> >
> >
> > 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.
> > -------------------------------------------------------------------------
> >-- -------------
> >
> >
> >
> >                       "Prestel, Marianne"
> >                       <prestel at itiv.uni-karl        To:
> > <opencms-dev at www.opencms.org> sruhe.de>                     cc:
> >                       Sent by:                      Subject:  AW:
> > [opencms-dev] >1 template per content item ??? owner-opencms-dev at www.
> >                       opencms.org
> >
> >
> >                       21/11/2002 07:15 PM
> >                       Please respond to
> >                       opencms-dev
> >
> >
> >
> >
> >
> >
> > Hi Stephen, Hi Mark,
> >
> > the "printer friendly" version of a page is exactly what I need too! I
> > created the <TEMPLATE name="print"> inside the contenttemplate and the
> > link as described. The result is, that the page will be opened in a blank
> > page, but with the normal template.
> > The output of the link is correct:
> > <a href="/opencms/opencms/index.html?cmsframe=print" target="_blank">
> > Any hints?
> > Thanks in advance and regards
> >
> > Marianne
> >
> > -----Ursprüngliche Nachricht-----
> > Von: mfoley5 at csc.com.au [mailto:mfoley5 at csc.com.au]
> > Gesendet: Mittwoch, 20. November 2002 10:00
> > An: opencms-dev at www.opencms.org
> > Betreff: Re: [opencms-dev] >1 template per content item ???
> >
> >
> > Thanks Stephen,  that works a treat!
> >
> > 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
> >
> >                       <hartmann at waehrisch-fe        To:
> > opencms-dev at www.opencms.org
> >
> >                       ykes.de>                      cc:
> >
> >                       Sent by:                      Subject:  Re:
> > [opencms-dev] >1 template per content item ???
> >                       owner-opencms-dev at www.
> >
> >                       opencms.org
> >
> >
> >
> >                       20/11/2002 06:05 PM
> >
> >                       Please respond to
> >
> >                       opencms-dev
> >
> >
> >
> >
> >
> >
> >
> > 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.

-- 
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