<{foreach item=main key=key from=$block.menus name=mainloop}>
<{if $smarty.foreach.mainloop.first}><ul class="sf-menu"><{/if}>

<li><a href="<{$main.link}>"><{$main.title}></a>

<{foreach item=sub key=subkey from=$main.submenus name=subloop}>

<{if $smarty.foreach.subloop.first}><ul><{/if}>

<li><a href="<{$sub.link}>"><{$sub.title}></a></li>

<{if $smarty.foreach.subloop.last}></ul><{/if}>

</li>
<{/foreach}>

<{if $smarty.foreach.mainloop.last}></ul><{/if}>

<{/foreach}>
