[opencms-dev] cms:contentload - date created needed instead of datemodified
HuyTran at c-mg.net
HuyTran at c-mg.net
Sat May 10 04:25:01 CEST 2008
I think you can create a complex type (XML structured content) using the
mapping element with priority in the XSD file as an example bellow. When you
create a new content of this type, you can put in a Priority number. Then in
the contentload-tag use collector="allInFolderPriorityDateDesc".
Note that, this will sort the from the highest to lowest number, that makes
the using of Priority number inconvenient.
I think collector attribute in contentload tag needs to extend in coming
releases of OpenCms.
<xsd:complexType name="OpenCmsNewsArticle">
<xsd:sequence>
<xsd:element name="Name" type="OpenCmsString" />
<xsd:element name="Position" type="OpenCmsString" />
<xsd:element name="Description" type="OpenCmsHtml"
/>
<xsd:element name="Photo" type="OpenCmsVfsFile"/>
<xsd:element name="Priority" type="OpenCmsString"/>
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale"
use="required"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<resourcebundle
name="org.opencms.frontend.templateone.modules.workplace"/>
<layouts>
<layout element="Photo"
widget="ImageGalleryWidget" />
</layouts>
<mappings>
<mapping element="Priority"
mapto="property:collector.priority" />
</mappings>
</xsd:appinfo>
</xsd:annotation>
Regards
Huy
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marc Schlegel
Sent: Saturday, May 10, 2008 8:30 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] cms:contentload - date created needed instead of
datemodified
Hello Everyone
I am having a problem with a contentload-tag because it is loading the
elements according to their modified date (so´, the last modified is the
first in the list) but I need to have the last created element to be the
first one
I am using the "allInFolderDateReleasedDesc" collector because I thought
this one provides this functionality. How can I achieve this? If I need
to create my own collector, how can I do this (and use it in the tag)?
best regards
-- Marc
_______________________________________________
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/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list