{/for} {elseif $comment.depth > $prevdepth} {/for} {/if} {/if} {assign var="prevdepth" value=$comment.depth} {/foreach}