[TYPO3-core] RFC #14551: Sorting missing in "template overview"

Reinhard Führicht rf at typoheads.at
Thu Jun 3 23:26:40 CEST 2010


Am 03.06.2010 21:14, schrieb Christian Kuhn:
> Hey,
>
> Reinhard Führicht wrote:
>> Problem:
>> The overview of all TS templates shows a tree like view listing all
>> pages having a ts template on them. But this view doesn't sort the
>> pages by "sorting" like in the pagetree. This results in a different
>> order.
>>
>> Solution:
>> Add sorting to the exec_SELECTquery call.
>
> Hmm, with your patch (order by sorting) my tree looks even more random.
>
> Imho this is not fixable on a simple query base (correct me if I'm
> wrong). I think you'd have to iterate through the tree with single
> queries, then get sorted childrecords. But this would probably lead to a
> nice performance problem with large trees (tons of queries).
> Another idea is to get all records with one query (like it's done now),
> and build the tree with some more sophisticated php logic that takes
> sorting depending on pid (treelevel) into account. Maybe we're able to
> get rid of the (expensive but maybe cached) t3lib_BEfunc::BEgetRootLine
> call this way, too.
>
> My 2 cents
> Christian

I'm afraid you are right. In my case setting the sorting worked fine, 
but actually my fix will not work since (as you said) the pages aren't 
selected recursively but in a single query.
I'm not sure if sorting the array with PHP will work out fine, but I 
will give it a try and see if I can come up with a patch.

Regards,
Reinhard


More information about the TYPO3-team-core mailing list