[opencms-dev] Is it possible to get the latest 10 published files under a specified folder like "/news" without calling index manager?

opencms at biberbeatz.de opencms at biberbeatz.de
Tue Oct 4 18:02:12 CEST 2005


Hi Jim,

have a look at the XML-Content Demo. In the folder
/sites/default/xmlcontentdemo is the list.jsp. This file does collect
the latest news with a collector (defined in the properties of this
file: allInFolderDateReleasedDesc).

With a another parameter in the jsp:
param="${property.xmlcontent-demo}article_${number}.html|article|10"

it collects the 10 latest documents of type "article" with the naming
convention article_$articlenumber.html

If you want to use this list.jsp in another site you have to define
the propery "xmlcontent-demo" with the path to the articles which
should be collected e.g. "news/articles/". the property has to be set
to the "news" folder.

File structure:
/news --> set the property "xmlcontent-demo"
/news/articles --> here all the articles will be stored
/news/list.jsp --> will be called to show the 10 latest news

Hth,

Jan

jim wrote:
> hi all,
>     I want to get the latest 10 files under a folder "/news",how
can I do this?do I have to call index manager to build index?if so,I
think it is a little slow because whenever I published a file ,I have
to build it.any body can help me?
> 
> 
>
---------------------------------------------------------------------
---
> 
> 
> 
> _______________________________________________
> 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



More information about the opencms-dev mailing list