[opencms-dev] Writing several documents in one page ?

Alexander Kandzior alex at opencms.org
Wed Jun 18 14:00:01 CEST 2003


To get the body as a String, first write a simple JSP(a) that outputs
the body with the include() method as described in the last email. On
any JSP(b), use getContent() with the URI of JSP(a). Use the request
context to store an attribute of the uri of the "page" file that is to
be included. On JSP(a), read this request attribute and use this as
target for the include() call. 

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

> -----Original Message-----
> From: opencms-dev-admin at opencms.org 
> [mailto:opencms-dev-admin at opencms.org] On Behalf Of Frank Wunderlich
> Sent: Wednesday, June 18, 2003 1:34 PM
> To: opencms-dev at opencms.org
> Subject: AW: [opencms-dev] Writing several documents in one page ?
> 
> 
> Well, yes... but what if I would just like to include a part 
> of the body (for example just the first 200 characters, or 
> the first section, marked bold). The include-Method writes 
> the content into the response and returns "void", but what if 
> I need the body as a string? 
> 
> Is there just the way I described in my earlier mail (parsing 
> the xml in "system/bodies")? Is there a reason why the 
> getContent()-method returns the mentioned error-message?
> 
> TIA,
> Frank.
> 
> > -----Ursprüngliche Nachricht-----
> > Von: opencms-dev-admin at opencms.org
> > [mailto:opencms-dev-admin at opencms.org] Im Auftrag von 
> > Alexander Kandzior
> > Gesendet: Mittwoch, 18. Juni 2003 13:13
> > An: opencms-dev at opencms.org
> > Betreff: RE: [opencms-dev] Writing several documents in one page ?
> > 
> > 
> > To output the "body" content of a "page" you can use
> > 
> > <%
> > CmsJspNavElement nav;
> > 
> > // initialize nav somehow...
> > 
> > String uri = nav.getResourceName();
> > com.opencms.flex.jsp.CmsJspActionElement.include(uri, "body"); %>
> > 
> > Best Regards,
> > Alex.
> > 
> > Alexander Kandzior
> > Alkacon Software - The OpenCms Experts
> > http://www.alkacon.com
> > 
> > 
> > > -----Original Message-----
> > > From: opencms-dev-admin at opencms.org 
> > > [mailto:opencms-dev-admin at opencms.org] On Behalf Of Frank 
> Wunderlich
> > > Sent: Wednesday, June 18, 2003 12:59 PM
> > > To: opencms-dev at opencms.org
> > > Subject: AW: [opencms-dev] Writing several documents in one page ?
> > > 
> > > 
> > > Hi Alex,
> > > 
> > > I tried this too, but the resulting String is in my case 
> something 
> > > like
> > > 
> > > ??? com.opencms.core.CmsException: XML document 
> > > /homepage/leistungen/webdevelopment/index.html is not of the 
> > > expected type. This document is "page", but it should be 
> > > "XMLTEMPLATE" (OpenCms XML template file). ???...
> > > 
> > > Any clue?
> > > Frank.
> > > 
> > > 
> > > > 
> > > > Try using
> > > > 
> > > > <%
> > > > 
> > > > CmsJspNavElement nav;
> > > > 
> > > > // initialize nav somehow...
> > > > 
> > > > String uri = nav.getResourceName();
> > > > String content =
> > > > com.opencms.flex.jsp.CmsJspActionElement.getContent(uri);
> > > > out.println(content);
> > > > 
> > > > %>
> > > > 
> > > > Best Regards,
> > > > Alex.
> > > > 
> > > > Alexander Kandzior
> > > > Alkacon Software - The OpenCms Experts http://www.alkacon.com
> > > > 
> > > > > -----Original Message-----
> > > > > From: opencms-dev-admin at opencms.org 
> > > > > [mailto:opencms-dev-admin at opencms.org] On Behalf Of
> > > > Apostoly Guillaume
> > > > > Sent: Wednesday, June 18, 2003 11:33 AM
> > > > > To: opencms-dev at opencms.org
> > > > > Subject: [opencms-dev] Writing several documents in one page ?
> > > > > 
> > > > > 
> > > > > Does anybody know how to write several documents (OpenCMS
> > > > > "pages") on one JSP page ? Let's say i've got an 
> ArrayList with
> > > > > several CmsJspNavElement inside, how can i 
> > > > > "out.println("thecontentofeachelement")" ? Thanks by advance.
> > > > >  
> > > > > Guillaume.
> > > > > _______________________________________
> > > > > Guillaume APOSTOLY
> > > > > Business-Analyst EIS-BSD
> > > > > Tél: +33 (0)1.30.44.95.22
> > > > > Fax: +33 (0)1.30.44.98.08
> > > > > ApostolyG at mail.europcar.com 
> > <mailto:ApostolyG at mail.europcar.com>
> > > > > 
> > _______________________________________
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  
> > > > > _______________________________________________
> > > > > This mail is send to you from the opencms-dev mailing
> > > list To change
> > > > > your list options, or to unsubscribe from the list, 
> please visit 
> > > > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > > > > 
> > > > > 
> > > > 
> > > > _______________________________________________
> > > > This mail is send to you from the opencms-dev mailing
> > list To change
> > > > your list options, or to unsubscribe from the list, please visit
> > > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > > > 
> > > 
> > > 
> > > _______________________________________________
> > > This mail is send to you from the opencms-dev mailing 
> list To change 
> > > your list options, or to unsubscribe from the list, please visit
> > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > > 
> > > 
> > 
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list,
> > please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> > 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 




More information about the opencms-dev mailing list