{foreach} {свойства @index, @iteration, @first, @last, @show, @total}
Код: [Выделить]{foreach} {свойства @index, @iteration, @first, @last, @show, @total}
{section name=foo start=1 loop=10 step=1} {$smarty.section.foo.index}{/section}
{if ($i++ < 6)}{/if}