Can I add a command for sorting order in the following code?
Code: Select all
{section name=numloop loop=$items}
{if $items[numloop].typ == 'Verk'}
<td style="width: 650px;"><h2><a href="{$items[numloop].link}"><img src="{$items[numloop].image}" width="100px" style="float:left; padding-right:15px;" title="{$items[numloop].title}" alt="{$items[numloop].title}"/>
{$items[numloop].title}</a>{if $items[numloop].lyssning == "Ja"}  <img src="img/lyssning.png"/>{/if}</h2>
{foreach from=$attrlist item=attr key=k}
{$items[numloop][$k]}
{/foreach}
{/if}
</td>
        {if not ($smarty.section.numloop.rownum mod $cols)}
                {if not $smarty.section.numloop.last}
                        </tr><tr>
                {/if}
        {/if}
        {if $smarty.section.numloop.last}
                {math equation = "n - a % n" n=$cols a=$items|@count assign="cells"}
                {if $cells ne $cols}
                {section name=pad loop=$cells}
                        <td style="width: 200px;"> </td>
                {/section}
                {/if}
                </tr>
        {/if}
   {/section}
</table>

