<div class="main-menu-container">
    <ul class="main-menu">
        {foreach from=$nodelist item=node name=pagr key=key}
            {if $node->depth==2}
                {assign var="data" value=$node->id|get_data}
                <li class="{if $node->extra1}imprnt {/if}{if ($node->current == true) || ($node->parent) }selected{/if} {if $node->children_exist && (!$data.no_drop || $node->current == true || $node->parent)}has-submenu{/if}">
                    <a href="{$node->url}"{if $node->target} target="{$node->target}"{/if}>{$node->menutext}</a>
                    {capture assign="parent_alias"}{$node->url}{/capture}
                    {if !$data.no_drop || ($node->current == true) || ($node->parent)}
                        {menu childrenof=$node->id template="mainmenu2" number_of_levels="1"}
                    {/if}
                </li>
            {/if}
        {/foreach}
    </ul>
</div>
