[opencms-dev] question about nested content
Tim Daschner
timd at thedoleco.com
Tue Jun 1 19:27:41 CEST 2010
Hi borja,
Thanks for the reply. Yes, your idea is good, the problem I have is that in
our model we have more than one nested elements that may each nest multiple
nested elements. So, my jsp has a sequence of contentload, contentloop,
contentshow that are nested. In this nested jsp, I don't seem to get my
values correctly and that's where the confusion is.
Best,
Sachin
On Jun 1, 2010 3:29 AM, "Borja Fernandez Pillado" <borja.fpillado at gmail.com>
wrote:
Hi Tim,
I'm gonna try to explain you what you have to do for working all these
things out and why it doesn't work. Well, in the first xml content you have
a VFS field, where you edit a path, everything ok till here. Although the
path is pointing to another xml content, it doesn't matter, it is just a
path, so there's no more information in this field.
So If you write in your jsp
<cms:contentload><cms:contentloop><cms:contentshow> you are getting the
directions, the paths which you edited previously.
The way that I solve this is keeping the path in the pageContext and then I
open another <cms:contentload>. This is an example:
<cms:contentload collector="XXX" param="XXX" >
<cms:contentcheck ifexists="FieldVFS">
<cms:contentloop element="FieldVFS">
<c:set var="myPath"> <cms:contentshow/> </c:set>
<cms:contentload collector="singleFile"
param="%(pageContext.myPath)" >
// Your code here
</cms:contentload>
</cms:contentloop>
</cms:contentcheck>
</cms:contentload>
As you can see, we get the path from the first xml and then we get the
information of the nested xml content. I hope to help you.
Regards
2010/5/31 Tim Daschner <timd at thedoleco.com>
> >
> > Hello,
> >
> > I have a xml content definition which has a field that can contain 0 or
> more vfs file...
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100601/597da4ad/attachment.htm>
More information about the opencms-dev
mailing list