Hello.
Faced a problem. Perhaps I am doing wrong ... The bottom line is this. There is a menu and it has 8 menu items!
<ul> {foreach $arr AS $a} <li>{$a.name}</li> {if $a@iteration % 4 == 0}</ul><ul>{/if} {/foreach} </ul>
The problem is that in the end I get 3 ul. Those. it turns out that when the number of cycles reaches 4, then the previous ul is closed and the next ul opens ... Well, it ultimately generates 3 ul, which, in principle, is logical, based on the code. The question is how to remove the last empty ul? More precisely, yes, how to break correctly so that there is no such joint?