[TYPO3-english] Random order of a list

amadeo Marketing & Design - Paul Garais garais at amadeo-marketing.de
Fri Sep 21 14:33:42 CEST 2012


Hi Jan,

you could get the images directly from the database via ts ... example:

     10=CONTENT
10{
table=tt_content
select{
elementsarestored
pidInList=*PAGE_ID*
max=5
orderBy=rand()
}
}


Greets,
Paul

Am 21.09.2012 14:10, schrieb Jan Bednarik:
> Hi,
>
> I've got a list of images (standard Image content element - meaning it's image filenames seprated 
> with comma) and I'd like to shuffle them and take only first 5. Is it possible with pure TS? With 
> split I can specify that I want only 5 images, but I'd need to take random 5.
>
> I guess I can use preUserFunc to shuffle the list, but I'd prefer pure TS if possible.
>
> Thanks
>
> Jan
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list