[opencms-dev] All the resources in a folder

Inmaculada Piquero Buedo inpibu at hotmail.com
Wed Sep 28 09:38:22 CEST 2005


Hello.

I´ve created different type of resources, that I have called resource_1, 
resource_2, 
 using different XSD files, and jsps to show it in the screen.

I´m trying to make a jsp that offers to me the possibility of seeing all the 
resources I have, so I´m trying to do something like this :

<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<html>
<head><title>Index Test</title></head>
<body>
<cms:editable/>
<div class="element">
<cms:contentload collector="allInFolderPriorityDateDesc" 
param="/tests/|resource_1" editable="true">
   Algo de tipo Elemento1
        <h2><cms:contentshow element="Title" /></h2>
</cms:contentload >
<cms:contentload collector="allInFolderPriorityDateDesc" 
param="/tests/|resource_2" editable="true">
  Algo de Tipo Elemento2

  <h2><cms:contentshow element="Title" /></h2>
</cms:contentload >
<cms:contentload collector="allInFolderPriorityDateDesc" 
param="/tests/|resource_3" editable="true">
  Algo de Tipo Elemento 3
  <h2><cms:contentshow element="Title" /></h2>
</cms:contentload >
</body>
</html>

The problem it´s that I get all the time the title of the first element.

What´s wrong?

How could I make a jsp that makes a kind of "if" branch in the following 
sense ?

"If type=resource_1 -> show title, body"
"If type=resource_2 -> show title, text, image"
"If type=resource_3 -> show title,author"

Is this idea possible?
Could anyone giving me some advices?

Thanks.

_________________________________________________________________
Móviles, DVD, cámaras digitales, coleccionismo... Con unas ofertas que ni te 
imaginas. http://www.msn.es/Subastas/




More information about the opencms-dev mailing list