Forums / Developer / Custom Sorting Problem

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 [email protected]

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/