[opencms-dev] How to use templates in a repeat mode

Stefan Uldum Grinsted sug at interactive.as
Tue Jun 28 09:46:54 CEST 2005


Hi Gilles

You would want to take a look at th new xml-content functionality in 
OpenCMS 6.

There is some documentation for it under in the OpenCMS docs under 
alkacon-documentation, and some under xmlcontent demo. (You should read 
the first one first)
The documentation isn't complete, so i will give you some additional 
pointers.

You will have to create two xsd's. First create a xsd to describe a 
"linkitem" (or whatever you want to call it), with a string for your link 
and a string for the title.
Then create a xsd to describe the list, which should probaply only contain 
a sequence of linkintem's.

The documentation for nested xmlcontent is fund under xmlcontent demo.

Best Regards
Stefan Uldum Grinsted




"Gilles Archambault" <Gilles.Archambault at promutuel.ca> 
Sent by: opencms-dev-bounces at opencms.org
27-06-2005 21:20
Please respond to
The OpenCms mailing list <opencms-dev at opencms.org>


To
<opencms-dev at opencms.org>
cc

Subject
[opencms-dev] How to use templates in a repeat mode






Hi all,

I wonder how to add between 1 and 10 special calls to a Javascript
function in a template.

My first page contains only hyperlinks to other internal pages.
Each hyperlink shows the content of the page in another window
controlled by a JavaScript. 
So the only information I would need the users enter is:
- the hyperlink  (e.g: details/detail.html)
- the text of the hyperlink (e.g: Use this hyperlink)

So these lines should be added n number of times, depending on the
number of hyperlinks the user adds in the page.

Here is the code I would like to repeat n number of times:
<a href="#" onClick="openWindow('details/detail.html');">
   <img src="<cms:link>../resources/arrow.gif</cms:link>" border="0">
Use this hyperlink
</a> <br />

Is there a way to create such a template?

Also, I would need the user adds the number of hyperlinks he needs.
In a text editor, we would copy and paste the 3 lines above, but it is
not really user friendly...
How can I do that with OpenCms?

I am using OpenCms 6.0 RC1.

Thanks in advance,

Gilles A.


_______________________________________________
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050628/b6692c5b/attachment.htm>


More information about the opencms-dev mailing list