[opencms-dev] Including XML content

Bernd Wolfsegger bw at code-create.com
Tue Oct 25 16:22:06 CEST 2005


<cms:contentload collector="singleFile" param="/sitepath/teaser_1.html">

.
.
.
<cms:contentshow element="whatever" />
.
.
.

</cms:contentload>

To load xmlcontent you use contentload, to include layout template JSPs to visualize this content you use include.

Kind regards, Bernd

On Tuesday, 25. October 2005 16:45, Juri Ganitkevitch wrote:
> Hello everyone,
>
> I'm reposting this, because it really is urgent to me (and because
> I'm afraid my first mail got lost a bit, yesterday night). Sorry for
> the spamming :(
>
> So, my question refers to a problem I have experienced trying to do
> the following:
>
> I am using XML content for teasers, having a front page, where I'd
> like to display some of those.
> There is a detail view template for the teaser type which displays
> them exactly as they should be on the front page.
>
> Basically, I try to treat the XML content like normal page objects
> here. So, in my front page template, I'm doing:
> ...
> <cms:include file="somewhere/teaser_1.html" ?>
> ...
>
> What I would expect is the system to apply the known template to the
> XML content object and return me processed HTML code.
> Instead, this crashes. My guess would be that it interferes somehow
> with the XML content include-tag feature (accessing the attributes by
> "element="AttName" ").
>
> The same error can be reproduced easily (on my 6.0.0) by adding the
> following three lines to include.jsp in the xmlcontentdemo:
>
> <div class="element">
>      <cms:include file="article_0002.html" />
> </div>
>
> Is there a elegant way to include detail views of XML content into
> site code? Using CmsJspActionElement.getContent() gives me nothing
> usable in return.
> Should I include a template instead and pass the XML content's name
> on to it? This doesn't really seem right to me either.
>
> Can anybody help me out here? This would be really appreciated.
>
> Big thanks in advance!!
>
> Cheers,
>
> Juri
>
>
>
>
>
>
> _______________________________________________
> 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

-- 

[  Code Create
[  Web Content Management and Presentation


[  Bernd Wolfsegger
[  Sun Certified Programmer for Java(TM) 2 Platform


[  Lohmeyerstrasse 13
[  10587 Berlin
[  Germany
[  Fon +49 (0)30 26555788
[  Fax +49 (0)30 2651835
[  Mobile +49 (0)163 6505622

[  bw at code-create.com
[  http://www.code-create.com/




More information about the opencms-dev mailing list