Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/smarty/templates/main_menu.tpl
{* Smarty template *}

{message key='common.button.create' assign='createText'}
{message key='common.button.edit' assign='updateText'}
{message key='common.button.delete' assign='deleteText'}

{count array=$menus.main.items assign='mainMenuLinksNumber'}
{getPages menu=main assign='menuPages'}
{count array=$menuPages assign='menuPagesNumber'}
{if $mainMenuLinksNumber || $menuPagesNumber}
    <div class="block">
        {foreach from=$menus.main.items item=link}
            <div class="singleLevelMenuItem">
                <a href="{$link.link}"{if $link.new} target="_blank"{/if}>{$link.text}</a>
            </div>
        {/foreach}
        {foreach from=$menuPages item=menuPage}
            {buildUrl action='callCreatePage' assign='createUri' returnUrl=$localRequestUri menu=$menuPage->menu layout=$menuPage->layout languageCode=$currentLanguage}
            {buildUrl action='callUpdatePage' assign='updateUri' returnUrl=$localRequestUri id=$menuPage->id}
            {buildUrl action='deletePage' assign='deleteUri' returnUrl=$localRequestUri id=$menuPage->id}
            {contextMenu link_1=$createUri text_1=$createText permId_1='createPage'
                    link_2=$updateUri text_2=$updateText permId_2='updatePage'
                    link_3=$deleteUri text_3=$deleteText confirm_3=true permId_3='deletePage'
                    editModeOnly=true}
                <div class="singleLevelMenuItem">
                    <a href="{buildUrl identifier=$menuPage->identifier friendly='page' language=$menuPage->language}">{$menuPage->title|escape}</a>
                </div>
            {/contextMenu}
            {ifEditMode}
                {include file='context_menu.tpl'}
            {/ifEditMode}
        {/foreach}
    </div>
{/if}
Return current item: Blandware AtLeap Lite - CMS on PHP