[opencms-dev] Including multiple elements

Sebastian Lavena slavena at mkti.com.ar
Fri Jul 22 23:47:02 CEST 2005


To be more descriptive, I attach the source of my index.jsp by opencms....

If you look inside, I have 2 elements, and both have the name "body". My 
idea, is to have 5, 10, 15, whatever elements with the same name ("body"), 
and then include all of them, in my template...


<?xml version="1.0" encoding="UTF-8"?>

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xsd">
  <page language="en">
    <element name="body">
          <links>
        ...
      </links>
      <content><![CDATA[
        Element One content  ]]></content>
    </element>
    <element name="body">
      <links/>
      <content><![CDATA[Element two content.]]></content>
    </element>
<element name="body">
      <links/>
      <content><![CDATA[Element two content.]]></content>
    </element>

  </page>
</pages>

----- Original Message ----- 
From: "Alexander Wallace" <aw at avatartechnology.com>
To: "The OpenCms mailing list" <opencms-dev at opencms.org>
Sent: Friday, July 22, 2005 6:33 PM
Subject: Re: [opencms-dev] Including multiple elements


what will determine the amount of elements? This sounds like xmlcontent, 
have
you researched that? There are examples in the templateone demo distributed
with ocms...

On Friday 22 July 2005 04:10 pm, Sebastian Lavena wrote:
> Hi,
>
>     I`m trying to include multiples elements thats I donĀ“t know in compile
> time the how many I will have. So, my idea is to have many elements 
> "body",
> and include all of them in my template...
> For now, I'm using this code to include only one:
>
> <cms:template element="body">
>   <cms:include element="body" editable="true"/>
> </cms:template>
>
> I see in the help de tag <cms:template ifexist="body">...
>
> But really I need to have "n" body, and all of them must be included....
>
> Someone have an idea about this?
>
> Thanks a lot,
>
>
> Sebastian
>
>
>
> _______________________________________________
> 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


__________ NOD32 1.1176 (20050722) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





More information about the opencms-dev mailing list