|
Posted by Messju Mohr on 04/18/05 11:42
On Mon, Apr 18, 2005 at 02:02:13AM +0200, Roderik Emmerink wrote:
> Hi,
>
> I've got the code:
>
> {foreach item=premiumvermelding_id from=$premiumvermeldingen}
> <htmltags>
> {insert_object id=$premiumvermelding_id}</htmltags>
> {/foreach}
>
> to iterate an array.
> I'd like to randomize the order in which the assigned array is iterated.
> Is this possible with smarty?
write a modifier that shuffles the array. and use it like
{foreach item=premiumvermelding_id from=$premiumvermeldingen|@shuffle}
....
HTH
messju
Navigation:
[Reply to this message]
|