Basically this code gives me < li > 1 2 3 4 < / li > < li > 1 2 3 4 < / li > < li > 1 2 < / li >. So basically at end i need to put 3 and 4 with different result for example, < li >1 2 empty empty< / li > - since there should be always 4 results per one < li >< / li >, it is tricky because loop gives as much as it get's and sometimes there are less :).
<ul>
{section name=attribs loop=$AccountHistory}
{if $smarty.section.attribs.index % 4 == 0 or $smarty.section.attribs.first}
<li>
{/if}
{$smarty.section.iteration}
{if $smarty.section.attribs.index % 4 == 3 or $smarty.section.attribs.last}
</li>
{/if}
{/section}
</ul>