From c398373dcb7c6c8fce1ace24cd1e82d27d9d7a99 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 14 Dec 2012 17:22:04 -0800 Subject: [PATCH] Fix for dynamic menus. Simplified recursion. Lower-link template added and ready for active-link detection routine. --- e107_core/shortcodes/single/navigation.php | 15 +- e107_core/templates/navigation_template.php | 7 +- e107_handlers/sitelinks_class.php | 204 ++++++++++---------- 3 files changed, 116 insertions(+), 110 deletions(-) diff --git a/e107_core/shortcodes/single/navigation.php b/e107_core/shortcodes/single/navigation.php index ecfcccacf..1f4e3fc5c 100644 --- a/e107_core/shortcodes/single/navigation.php +++ b/e107_core/shortcodes/single/navigation.php @@ -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); } \ No newline at end of file diff --git a/e107_core/templates/navigation_template.php b/e107_core/templates/navigation_template.php index 6e5647755..457d63e75 100644 --- a/e107_core/templates/navigation_template.php +++ b/e107_core/templates/navigation_template.php @@ -63,7 +63,12 @@ $NAVIGATION_TEMPLATE['main']['submenu_item'] = ' '; - +$NAVIGATION_TEMPLATE['main']['submenu_loweritem'] = ' + +'; $NAVIGATION_TEMPLATE['main']['submenu_item_active'] = '