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

Christian Kuhn lolli at schwarzbu.ch
Thu Jun 10 02:15:51 CEST 2010


Steffen Kamper wrote:
> without looking into code here there is a possibility sorting records by 
> a list, eg
> ORDER BY FIELD(pid, '1,5,8,7,9,12,45')
> 
> If we have the rootline we could create a flat comma list and it woould 
> be possible, maybe worth a try?

Well, take a look at the source then ;) Imho it's not that simple. This 
one is a fun issue, and I think about it when I'm bored. Until now I 
didn't came up with a smart (fast and simple) solution.

Some details:
The major query gets all pages (in arbitrary oder), that has templates. 
The logic then gets the rootline for all rows and merges them to a tree.

Imho, it would be better to get all records with templates, merge them 
to a half structured tree, then get all missing parent pages and merge 
with current tree. If done right, no resorting is needed anywhere 
(because the first query does a basic sort by sorting?) and all missing 
pages could be injected to finalize the tree.

But the issue doesn't have priority for me, so don't expect any code 
output from me within the next time ;)

Regards
Christian


More information about the TYPO3-team-core mailing list