<aside class="article-tmp__aside">
    <nav class="article-tmp__nav">
        <ul>
            {fetch_sections assign=menus status="V" level=1}
            {foreach item=menu from=$menus name=menus}
                {if isset($menu.children)}
                    <li>
                        <button>{$menu.alias}</button>
                        <ul>
                            {fetch_sections assign=subMenus from=$menu.sectionId status="V" level=2}
                            {foreach item=subMenu from=$subMenus name=subMenus}
                                <li><a {if isset($section.sectionId) && $section.sectionId eq $subMenu.sectionId}class="active"{/if}  href="{if !empty($subMenu.externalLink)}{$subMenu.externalLink}{else}{$SITE_URL}{$subMenu.url}{/if}">{$subMenu.name}</a></li>
                            {/foreach}
                        </ul>
                    </li>
                {else}
                    <li><a {if isset($section.sectionId) && $section.sectionId eq $menu.sectionId}class="active"{/if} href="{if !empty($menu.externalLink)}{$menu.externalLink}{else}{$SITE_URL}{$menu.url}{/if}">{$menu.alias}</a></li>
                {/if}
            {/foreach}
        </ul>
    </nav>
</aside>