1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-19 04:41:53 +02:00

Fix for dynamic menus. Simplified recursion. Lower-link template added and ready for active-link detection routine.

This commit is contained in:
Cameron
2012-12-14 17:22:04 -08:00
parent e47f9cf5eb
commit c398373dcb
3 changed files with 116 additions and 110 deletions

View File

@@ -9,17 +9,14 @@ function navigation_shortcode($parm='')
'alt' => 4
);
$category = varset($types[$parm], 1);
$tmpl = vartrue($parm, 'main');
//$data = e107::getNav()->getData($cat);
//return e107::getNav()->render($data, $tmpl);
$nav = e107::getNav();
$category = varset($types[$parm], 1);
$tmpl = vartrue($parm, 'main');
$nav = e107::getNav();
$template = e107::getCoreTemplate('navigation', $tmpl);
$data = $nav->collection($category);
$data = $nav->initData($category);
// $data = $nav->collection($category);
return $nav->render($data, $template);
}

View File

@@ -63,7 +63,12 @@ $NAVIGATION_TEMPLATE['main']['submenu_item'] = '
</li>
';
$NAVIGATION_TEMPLATE['main']['submenu_loweritem'] = '
<li role="menuitem" class="dropdown-submenu">
<a href="{LINK_URL}">{LINK_IMAGE}{LINK_NAME}</a>
{LINK_SUB}
</li>
';
$NAVIGATION_TEMPLATE['main']['submenu_item_active'] = '
<li role="menuitem" class="active">