[opencms-dev] Looping over files
Petr Chelčický
petr.chelcicky at centrum.cz
Fri Mar 19 09:47:11 CET 2010
I'm sorry but unfortunately my webmail client hid the code, so I'm sending it again:
Hi!
I'm developing a website using OpenCMS and am having a problem with creating links to files over which I loop using cms:contentload:
<cms:contentload collector="allInFolder" param="ePass/faqs/|FaqFile" editable="false">
<%-- create a date object from date value --%>
<% int i = 0; %>
<cms:contentcheck ifexists="Subcategories">
<cms:contentloop element="Subcategories">
<cms:contentloop element="Faqs">
<% i++; %>
</cms:contentloop>
</cms:contentloop>
</cms:contentcheck>
<b><a href="${opencms.filename}"><cms:contentshow element="Title" /></a></b> (<%= i %> answers) <br />
</cms:contentload>
This is part of the index.jsp file. All the links unfortunately lead to index.jsp and not to the individual FAQ files. Do you know how to change this?
Thanks,
Peter
More information about the opencms-dev
mailing list