e107inc / bootstrap4

Bootstrap4 Theme folder working repo
1 stars 0 forks source link

Navigation - {LINK_IDENTIFIER} and {LINK_PARENT} are empty #7

Open Jimmi08 opened 5 years ago

Jimmi08 commented 5 years ago

Support for 3 level menu removed Used standard navbar markup with divs for 2 level

Problem:

// Main Link which has a sub menu. 
$NAVIGATION_TEMPLATE['main']['item_submenu'] = '
    <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle"  id="navbarDropdown{LINK_IDENTIFIER}"  role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" title="{LINK_DESCRIPTION}">
         {LINK_ICON}{LINK_NAME} 
        </a> 
        {LINK_SUB}
    </li>
';

// Main Link which has a sub menu - active state.
$NAVIGATION_TEMPLATE['main']['item_submenu_active'] = '
    <li class="nav-item dropdown active>
        <a class="nav-link dropdown-toggle"  id="navbarDropdown{LINK_PARENT}"  role="button" data-toggle="dropdown" data-target="#" href="{LINK_URL}" title="{LINK_DESCRIPTION}">
         {LINK_ICON}{LINK_NAME} 
        </a> 
        {LINK_SUB}
    </li>
';

{LINK_IDENTIFIER} and {LINK_PARENT} are empty

image

CaMer0n commented 5 years ago
if(empty($val['link_identifier']) && !empty($val['link_function']))
{
    $val['link_identifier'] = $frm->name2id($val['link_function']);
}

It was originally designed for sitelink functions, but it could be expanded.