Forums / Developer / Array sorting / Comment46370

Author Topic

Andrew Kelly

Wednesday 26 July 2006 12:44:00 am

Comment46370

Hi Kristof,

The code for the sort_by parameter is in eZContentObjectTreeNode::createSortingSQLStrings (kernel/classes/ezcontentobjecttreenode.php).

Thanks for that.

Which datatype are you using? If it's not publicly available, can you post the code from the functions sortKeyType and sortKey?

Ah..
I think you caught me being stupid (and pointed me in the right direction).
The datatype in question is one I built myself (my first attempt at creating
a datatype actually) and is loosely based on the Fats Neutron verson of the country
datatype. I call it cfselection (content fed selection) and it's simply a rather vanilla
multiple selection, except that it takes its option list from the content tree. The data is
stored in a comma delimited string.
And I see that neither of the functions you've mentioned are even part of the
datatype which is probably a pretty good way towards an explanation and solution.

May I assume that these functions are called from somewhere outside the datatype itself?

Andy