Custom Sorting Problem

Author Message

Willie Seabrook

Thursday 28 August 2003 8:18:25 pm

Hi,

How do I do custom sorts? I think there is a feature for this but I'm unsure of how to use it - $node.sort_array. Lets say i have a folder containing 10 folders, and they can be naturally ordered, but not numerically or alphabetically. Like

United States
New York
Manhatten
Some Street
House 12

Has a natural order (largest area at top), but not alphabetical. So how do I do this in ez? Its easy in normal code its simply if-else stuff. Is there someplace I can define a custom sorting function?

Regards,
Willie

Willie Seabrook

Thursday 28 August 2003 8:44:59 pm

It seems that the new fetch sorting by custom attribute feature in 3.2 may offer *some* of this feature, ie make it easier to come up with a hack, but I can't find the relevant files to patch across to 3.1. What files is the relevant functionality defined in does anyone know?

Regards,
Willie

Björn Dieding@xrow.de

Tuesday 02 September 2003 2:00:36 am

hmmm I think you should check either the
/kernel/common/eztemplateautoload.php
or
the lib in /lib/eztemplate

good luck

I would recommend coding a standalone templateopterator

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

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 06:00:46
Script start
Timing: Jan 31 2025 06:00:46
Module start 'layout'
Timing: Jan 31 2025 06:00:46
Module start 'content'
Timing: Jan 31 2025 06:00:46
Module end 'content'
Timing: Jan 31 2025 06:00:46
Script end

Main resources:

Total runtime0.0167 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.1250151.2109
Module start 'layout' 0.00640.0027 739.335936.6328
Module start 'content' 0.00910.0061 775.968890.1094
Module end 'content' 0.01520.0015 866.078133.9922
Script end 0.0167  900.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002615.4106140.0002
Check MTime0.00106.1258140.0001
Mysql Total
Database connection0.00084.746410.0008
Mysqli_queries0.002715.963530.0009
Looping result0.00000.125410.0000
Template Total0.00116.510.0011
Template load0.00084.750710.0008
Template processing0.00031.674310.0003
Override
Cache load0.00053.102110.0005
General
dbfile0.001911.328280.0002
String conversion0.00000.055640.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