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.

eZ debug

Timing: Jan 18 2025 19:27:23
Script start
Timing: Jan 18 2025 19:27:23
Module start 'layout'
Timing: Jan 18 2025 19:27:23
Module start 'content'
Timing: Jan 18 2025 19:27:24
Module end 'content'
Timing: Jan 18 2025 19:27:24
Script end

Main resources:

Total runtime0.7293 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.7891152.6094
Module start 'layout' 0.00550.0032 740.398439.3984
Module start 'content' 0.00870.7193 779.7969520.9219
Module end 'content' 0.72800.0013 1,300.718812.2031
Script end 0.7293  1,312.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4265160.0002
Check MTime0.00130.1744160.0001
Mysql Total
Database connection0.00110.154410.0011
Mysqli_queries0.679093.1014630.0108
Looping result0.00090.1207610.0000
Template Total0.700996.120.3504
Template load0.00180.246620.0009
Template processing0.699195.848720.3495
Template load and register function0.00010.020110.0001
states
state_id_array0.00110.149510.0011
state_identifier_array0.00070.100520.0004
Override
Cache load0.00150.2031260.0001
Sytem overhead
Fetch class attribute can translate value0.00060.080220.0003
Fetch class attribute name0.00130.172960.0002
XML
Image XML parsing0.00070.097220.0004
class_abstraction
Instantiating content class attribute0.00000.002670.0000
General
dbfile0.00090.1250160.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs