[TYPO3-dev] sorting tt_content

Jigal van Hemert jigal at xs4all.nl
Thu Oct 15 15:43:02 CEST 2009


Christian Kartnig wrote:
> I want to move lots of content of a site from the right column 
> (colPos=2) to the bottom of the normal column (colPos=0) via a database 
> query or a script.
> 
> Now I'm not sure how the sorting is done in the sorting column of 
> tt_content. I want the new content to be always at the bottom.

A deleted item gets sorting value 1000000000
If a record is added to the bottom of a list it will get the highest 
sorting value (of a not deleted record) + 256.
If a record is added to the top of a list it will get the lowest sorting 
value devided by 2.
If...

If the algorithm runs into problems it calls a resorting function.

You can find the algorithm and functions in 
t3lib/class.t3lib_tcemain.php, t3lib_TCEmain::getSortNumber() and 
t3lib_TCEmain::resorting().

Regards, Jigal.




More information about the TYPO3-dev mailing list