[TYPO3-dev] Trying to implement manual sorting of news records

Brian Bendtsen bb at bellevuevej.dk
Thu Aug 4 16:33:44 CEST 2011


Den 04/08/11 12.36, Brian Bendtsen skrev:
> Hi
>
> I have used the tt_news module for at slideshow presentation and would
> like to be able to sort the news, not by date, but manually.
>
> So I added a "sorting" field for tt_news table and set tca.ctrl.sortby =
> sorting.
>
> That makes the sorting arrows visible in the backend, but whenever I
> click them I get an error like this:
>
> 1: Attempt to move record 'A' (tt_news:8) to after a non-existing record
> (uid=7)
>
> Even though the tt_news item with uid=7 does exist
>
> Any idea why this does not work?
>
> Im using TYPO 4.5 and tt_news 3.0.1
>
> /Brian Bendtsen
Ok, solved it. Tried this:

$TCA['tt_news']['ctrl']['sortby'] = 'sorting, datetime DESC';

but that didn't fly, so changed it to this and that works:

$TCA['tt_news']['ctrl']['sortby'] = 'sorting';

/Brian Bendtsen




More information about the TYPO3-dev mailing list