sort by date

Author Message

Mazen Alsibai

Tuesday 15 November 2005 5:19:55 am

Hi:
if I have a class with an attribute of date datatype,and I want to sort the objects of that class according to that attribute,what is the correct clause ?
(sort_by,(what is the clause))
thanks

Gurudutt Verma

Tuesday 15 November 2005 6:23:30 am

Hi

This is very well explain here
http://ez.no/products/ez_publish_cms/documentation/reference/data_fetching/content/list

also see Example 4 and Example 5 in the above link.

Mazen Alsibai

Tuesday 15 November 2005 7:14:35 am

the attribute name is creation,
will it be sort_by,array(array( creation, false() ) ?

Gurudutt Verma

Tuesday 15 November 2005 7:40:38 am

Hi!

You want to sort by attribute so that should be like

'sort_by',array( 'attribute',false(),100 )
here 100 is attribute_id of creation see the class definition for that.

Also you can use the identifier of the class and the attribute like

'sort_by',array( 'attribute',false(),'yourclassname/creation' )

Mazen Alsibai

Tuesday 15 November 2005 8:07:49 am

many many thanks

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.