/ Published in: Smarty
How to sort array in smarty template?
>> Create sort modifier file and save it in smarty / plugins with
modifier.sortby.php name
use this modifier in smarty template like...
{foreach item=item key=key from=$users|@sortby:"firstname"}
{$item.id}-{$item.firstname}
{/foreach}
>> Create sort modifier file and save it in smarty / plugins with
modifier.sortby.php name
use this modifier in smarty template like...
{foreach item=item key=key from=$users|@sortby:"firstname"}
{$item.id}-{$item.firstname}
{/foreach}
URL: http://www.smarty.net/forums/viewtopic.php?t=1079&sid=044cd556ed67f6ee4ed47e7cdeccd3ca