sort_by..

Author Message

Lo' F.

Monday 15 November 2010 5:56:05 am

Hi,

- Where can I find, in the documentation, a list of allowed options for sort_by parameter of a fetch statement?

- If I use published will that resort the objects if, let's say, I edit an old object and click on publish. Will this move it on the top of the list?

- $node.sort_array sorts the array based on?

- Can anybody please also tell me what's the difference between using true() or false() after that? Is that meant to reverse the order?

Thanks a lot!

loredanaebook.it

Gaetano Giunta

Monday 15 November 2010 6:11:15 am

- http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Modules/content/Fetch-functions/list

Not really hard to find, imho... :-P

- $node.sort_array sorts the same way as the editor assigns in the admin interface, be it by date, name etc...

- True/False is used for sorting ascending or descending, as you guessed.

Principal Consultant International Business
Member of the Community Project Board

Lo' F.

Monday 15 November 2010 6:16:37 am

"

- http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Modules/content/Fetch-functions/list

Not really hard to find, imho... :-P

"

..bloody hell! Didn't scroll that page down :)

Thank you so so so much!

.. about using published I am afraid the order can be altered if an old object is edited again. I need to set the order based on when they are inserted first time. The fetch retrieves all the objects tree from the current node down..

loredanaebook.it

Peter Keung

Monday 15 November 2010 7:52:04 am

"

.. about using published I am afraid the order can be altered if an old object is edited again. I need to set the order based on when they are inserted first time. The fetch retrieves all the objects tree from the current node down..

"

That should not be the case unless you have a workflow that manually updates the publish date.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Gaetano Giunta

Monday 15 November 2010 9:06:09 am

published = time of 1st publication

modified = time of last editing

Principal Consultant International Business
Member of the Community Project Board

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 10:17:02
Script start
Timing: Jan 18 2025 10:17:02
Module start 'layout'
Timing: Jan 18 2025 10:17:02
Module start 'content'
Timing: Jan 18 2025 10:17:03
Module end 'content'
Timing: Jan 18 2025 10:17:04
Script end

Main resources:

Total runtime1.0860 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0102 588.8906152.5938
Module start 'layout' 0.01020.0040 741.484439.3828
Module start 'content' 0.01431.0684 780.8672617.5703
Module end 'content' 1.08260.0033 1,398.437516.2109
Script end 1.0860  1,414.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3342160.0002
Check MTime0.00130.1229160.0001
Mysql Total
Database connection0.00190.177910.0019
Mysqli_queries1.005992.6237650.0155
Looping result0.00080.0724630.0000
Template Total1.034095.220.5170
Template load0.00190.172420.0009
Template processing1.032195.037920.5161
Template load and register function0.00010.012210.0001
states
state_id_array0.00200.186210.0020
state_identifier_array0.00210.191020.0010
Override
Cache load0.00160.1462410.0000
Sytem overhead
Fetch class attribute can translate value0.00080.069330.0003
Fetch class attribute name0.00120.114380.0002
XML
Image XML parsing0.00330.304730.0011
class_abstraction
Instantiating content class attribute0.00000.0022100.0000
General
dbfile0.00500.4564290.0002
String conversion0.00000.000840.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs