diff --git a/e107_core/shortcodes/single/navigation.php b/e107_core/shortcodes/single/navigation.php index 2e30956eb..fe6ac41df 100644 --- a/e107_core/shortcodes/single/navigation.php +++ b/e107_core/shortcodes/single/navigation.php @@ -1,6 +1,13 @@ 1, @@ -10,11 +17,32 @@ function navigation_shortcode($parm='') 'alt5' => 5, 'alt6' => 6, ); - - $category = varset($types[$parm], 1); - $tmpl = vartrue($parm, 'main'); + + + if(is_array($parm) && !empty($parm)) + { + $category = 1; + $tmpl = 'main'; + + if(!empty($parm['type'])) + { + $cat = $parm['type']; + $category = varset($types[$cat], 1); + } + + if(!empty($parm['layout'])) + { + $tmpl= $parm['layout']; + } + } + else + { + $category = varset($types[$parm], 1); + $tmpl = vartrue($parm, 'main'); + } + $nav = e107::getNav(); - + $template = e107::getCoreTemplate('navigation', $tmpl); $data = $nav->initData($category); // $data = $nav->collection($category);