Sorting objects automaticly like defined on the admin

Author Message

Rami Grossman

Sunday 23 January 2005 7:11:02 pm

How can I sort objects automaticly like I defined in the admin?

Some of my folders are sorted in the admin by priority, some by name, etc.
I want to create tree view sorted automaticly by what I defined in the admin for each folder.

I thought that if I will fetch objects with no sorting it will sort automaticly by what was defined in the admin. But I see its not like that.

Thanks!

Rami Grossman

Sunday 23 January 2005 7:45:18 pm

I succeeded!!!
fetch('content','list',hash(parent_node_id,$node.node_id,'sort_by',array($node.sort_array.0,$node.sort_array.1)))

Thanks anyway!
please put it in the documentation examples. It should be usefull.

Artturi Markko

Friday 08 June 2007 8:22:38 am

Hi,

Where did you place this code, please ?

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 31 2025 03:30:59
Script start
Timing: Jan 31 2025 03:30:59
Module start 'layout'
Timing: Jan 31 2025 03:30:59
Module start 'content'
Timing: Jan 31 2025 03:30:59
Module end 'content'
Timing: Jan 31 2025 03:30:59
Script end

Main resources:

Total runtime0.0241 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.3594151.2266
Module start 'layout' 0.00610.0036 739.5859220.7188
Module start 'content' 0.00970.0128 960.3047997.7266
Module end 'content' 0.02250.0016 1,958.031329.9922
Script end 0.0241  1,988.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002811.4444140.0002
Check MTime0.00114.7603140.0001
Mysql Total
Database connection0.00083.437110.0008
Mysqli_queries0.002610.967430.0009
Looping result0.00000.049510.0000
Template Total0.00114.610.0011
Template load0.00093.652810.0009
Template processing0.00020.892710.0002
Override
Cache load0.00062.689910.0006
General
dbfile0.00114.670280.0001
String conversion0.00000.036640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs