de * @copyright four for business AG * @license http://www.contenido.org/license/LIZENZ.txt * @link http://www.4fb.de * @link http://www.contenido.org */ // assert framework initialization defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); // get client settings $rootIdcat = getEffectiveSetting('navigation_main', 'idcat', 1); $depth = getEffectiveSetting('navigation_main', 'depth', 3); // get category tree $categoryHelper = cCategoryHelper::getInstance(); $categoryHelper->setAuth(cRegistry::getAuth()); $tree = $categoryHelper->getSubCategories($rootIdcat, $depth); // get path (breadcrumb) of current category $filter = function(cApiCategoryLanguage $item) { return $item->get('idcat'); }; $path = array_map($filter, $categoryHelper->getCategoryPath(cRegistry::getCategoryId(), 1)); // use template to display navigation $smarty = cSmartyFrontend::getInstance(); $smarty->assign('ulId', 'navigation'); $smarty->assign('tree', $tree); $smarty->assign('path', $path); $smarty->display('staerk.tpl'); foreach($tree as $elem){ if(in_array($elem['idcat'],$path)){ $tt = $elem['item']->get('name'); } if(!empty($elem['subcats'])){ foreach($elem['subcats'] as $subelem){ if(in_array($subelem['idcat'],$path) && $subelem['item']->get('name')!=""){ $tt = $subelem['item']->get('name'); } } } } if(empty($tt)){ $tt = ""; } $tt = explode(" ",$tt); echo '
'. $tt[0] .'
'; ?>