[TYPO3-mvc] own sorting with extbase

Sebastian Schreiber me at schreibersebastian.de
Fri Jan 24 11:18:32 CET 2014


Hi you,
if you speak german, take a look at:
http://blog.schreibersebastian.de/2011/07/sortierung-anhand-einer-csv-list/

Hope that helps you

Sebastian



Am 24.01.2014 11:08, schrieb Alexander Averbukh:
> Hello all,
>
> My query looks like this:
>
>     $sorting = array('3', '1', '2', '7', '8', '5')
>     $query = $this->createQuery();
> $query->getQuerySettings()->setRespectStoragePage(FALSE);
>     $query->matching($query->in('uid', $sorting));
>     $results = $query->execute();
> How can I define the order of the entries? I want that, the sequence 
> looks like this:
>
> entry with uid=3
> entry with uid=1
> entry with uid=2
> entry with uid=7
> entry with uid=8
> entry with uid=5
>
> Is it possible with extbase or should I make it with php? I have tried 
> to work with $results as an array . Unfortunately it does not work.
>
> $temp = $results[0];
> $results[0] = $results[1];
> $results[1] = $temp;
>
>
> The order remains unchanged. Thank you for your help.
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


-- 
Sebastian Schreiber
(Medieninformatiker B.Sc.)
(TYPO3 Certified Integrator)

Schanzenstraße 27, Schlosserei 4
D-51063 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 219 / 5302 / 3123



More information about the TYPO3-project-typo3v4mvc mailing list