AW: [opencms-dev] Writing several documents in one page ?
Frank Wunderlich
k.frank.wunderlich at gmx.de
Wed Jun 18 12:52:01 CEST 2003
Good question. I have found a way, but I also would like to know if
their is a simpler solution.
I needed a kind of summary-page, that should list all titles,
descriptions and "abstracts" of the pages in its subfolders.
I looked at the news-module and custom content definitions first, but it
seemed to me, that their is still a lot of work to be done, if you want
to use all the nice features like access control,
online-/offline-versions, workflow, wysiwig-editor and so on, that
already exist for the "standard pages". So I decided to work with the
"standard pages" and to accept their semi-structuredness.
To build my summary-page I do the following:
- I iterate over all the pages (CmsJspNavElements) in the subfolders of
the current directory. (your ArrayList)
- For each CmsJspNavElement I can get the filename via
CmsJspNavElement.getResourceName()
- I access the properties of this file (for example to get its title)
with CmsJspActionElement.properties(file)
Accessing the content is a little bit more complicated, and I am really
not sure if their isn't a more elegant way to do it:
- The content of each page is stored in a xml-file placed somewhere down
"/system/bodies".
- I get the content of this file and use a xml-parser to build a
dom-representation of the file.
- Then I look for the CData-Section in the first <Template>-Element.
That's the html produced by the wysiwig-editor and probably the thing
you are looking for.
I really keen to hear if someone knows an easier way.
Regards,
Frank.
> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-admin at opencms.org
> [mailto:opencms-dev-admin at opencms.org] Im Auftrag von
> Apostoly Guillaume
> Gesendet: Mittwoch, 18. Juni 2003 11:33
> An: opencms-dev at opencms.org
> Betreff: [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
>
More information about the opencms-dev
mailing list