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

Gilles Archambault Gilles.Archambault at promutuel.ca
Mon Jun 27 21:20:47 CEST 2005


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.



More information about the opencms-dev mailing list