[opencms-dev] Ordering by a custom date field

Jose Ignacio Yarza jiyarza at opensistemas.com
Fri Jan 20 10:48:30 CET 2012


Hello List,


This is my first post so greetings to everyone, and please bear with me.

 I have a custom schema with this date field defined in it:


<xsd:element name="MyDate" type="OpenCmsDateTime" minOccurs="1" maxOccurs="1" />


I need to show listings ordered by this custom field. With some researh I found a collector and tried this in the JSPs:

<cms:contentload
		collector="allInFolderDateDesc" 
		param="/internet/news/notes/content_%(number).html|MyContentType|15|MyDate"
		pageSize="${param.pageSize}"
		pageIndex="1"
		editable="false">



But it does not work as I expected the list ordering is somewhat
arbitrary. I have not found much documentation about this collector in
particular so maybe something is wrong there.

Any help is very appreciated. This is a production system in a public
administration, and this change is important for my customer since
currently it shows the news disorderly.


Version is OpenCMS 7.


Thank you,

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


More information about the opencms-dev mailing list