[opencms-dev] Ordering by a custom date field
Khởi Nguyễn Văn
mailancuctruc88 at gmail.com
Fri Jan 20 11:22:34 CET 2012
hi Jose,
I don't understand %(number) of you which it means what?
- do you want to load a file which its "Structured Content = MyContentType"
& "file's name=content_1.html" & "on folder /internet/news/notes/" ?
if it's right, you use code:
<cms:contentload collector="singleFile"
param="/internet/news/notes/content_%(number).html" editable="true">
- if you want to load some of files which our "Structured Content =
MyContentType"
& "on folder /internet/news/notes/"
<cms:contentload collector="allInSubTreePriorityDateDesc"
param="/internet/news/notes/|MyContentType|15" editable="true">
good luck!
2012/1/20 Jose Ignacio Yarza <jiyarza at opensistemas.com>
> **
> 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
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
--
Best Regards,
------------------------
Nguyen Van Khoi
Sutrix Media - Developer
Mobile: 0976.593.588
Skype: vankhoiqn2003
Yahoo: vankhoiqn2003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120120/d47a14b3/attachment.htm>
More information about the opencms-dev
mailing list