{if !empty($categories)} {$categories_rights = $wa->userRights('setscategories')} {$depth = -1} {foreach $categories as $category} {if $category.depth < $depth} {section name="end-category" loop = $depth - $category.depth}
{/section} {$depth = $category.depth} {/if} {if $category.depth == $depth}