Sorting articles

Author Message

Kenneth Grande

Tuesday 03 July 2007 7:21:02 am

Hi,

When publishing articles in a folder they are by default sorted so that the oldest article is showed first, and the newest last. i would like to change this so it is the other way around.

I tried to change the default sort order of the sub elements of the folder class (and the article class) but nothing is changed. I also empty the cache before i refresh the page.

Frédéric DAVID

Tuesday 03 July 2007 8:50:31 am

To sort objects, you can use the function fetch list.

http://ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/list

To change this, you have to use the sort_by.

The default sort order of the sub elements of the folder class bug sometimes. I don't find a way to work everytime.

Blog : http://www.frefred.fr/blog/ez-publish
feZ Meta Data : http://projects.ez.no/fezmetadata

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:10:27
Script start
Timing: Jan 18 2025 19:10:27
Module start 'layout'
Timing: Jan 18 2025 19:10:27
Module start 'content'
Timing: Jan 18 2025 19:10:28
Module end 'content'
Timing: Jan 18 2025 19:10:28
Script end

Main resources:

Total runtime0.8439 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0137 588.9453152.6094
Module start 'layout' 0.01370.0038 741.554739.4141
Module start 'content' 0.01740.8251 780.9688519.0938
Module end 'content' 0.84250.0014 1,300.06258.1875
Script end 0.8439  1,308.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3798160.0002
Check MTime0.00130.1580160.0001
Mysql Total
Database connection0.00110.129210.0011
Mysqli_queries0.785893.1109540.0146
Looping result0.00050.0564520.0000
Template Total0.773791.720.3868
Template load0.00180.217920.0009
Template processing0.771891.460120.3859
Template load and register function0.00020.021910.0002
states
state_id_array0.00210.251710.0021
state_identifier_array0.00190.221120.0009
Override
Cache load0.00150.1756120.0001
Sytem overhead
Fetch class attribute can translate value0.00070.082620.0003
Fetch class attribute name0.00120.139230.0004
XML
Image XML parsing0.00060.073020.0003
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00991.1724160.0006
String conversion0.00000.001140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs