Index: branches/RC/core/units/general/helpers/category_helper.php =================================================================== diff -u -N -r11336 -r11501 --- branches/RC/core/units/general/helpers/category_helper.php (.../category_helper.php) (revision 11336) +++ branches/RC/core/units/general/helpers/category_helper.php (.../category_helper.php) (revision 11501) @@ -6,7 +6,7 @@ { $main_category_id = isset($params['cat_id']) ? $params['cat_id'] : $this->Application->GetVar('m_cat_id'); - $home_element = $this->getHomeCategoryPath($params); + $home_element = $this->getHomeCategoryPath($params, $main_category_id); if (!getArrayValue($params, 'titles') && !getArrayValue($params, 'templates')) { // no static templates given, show only category path return $home_element . $this->getCategoryPath($main_category_id, $params); @@ -161,10 +161,11 @@ return $module_info; } - function getHomeCategoryPath($params) + function getHomeCategoryPath($params, $current_category) { - $block_params['cat_id'] = 0; + $block_params['cat_id'] = $this->Application->findModule('Name', 'Proj-CMS', 'RootCat'); // 0; $block_params['no_editing'] = 1; + $block_params['current'] = $current_category == $block_params['cat_id'] ? 1 : 0; $block_params['cat_name'] = $this->Application->ProcessParsedTag('m', 'RootCategoryName', $params); $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,render_as'); return $this->Application->ParseBlock($block_params); @@ -207,12 +208,16 @@ WHERE '.$id_field.' = '.$main_category_id; $category_data = $this->Conn->GetRow($sql); + $skip_category = $this->Application->findModule('Name', 'Proj-CMS', 'RootCat'); $cached_path[$main_category_id] = Array (); if ($category_data) { $category_names = explode('&|&', $category_data[$navbar_field]); $category_ids = explode('|', substr($category_data['ParentPath'], 1, -1)); foreach ($category_ids as $category_index => $category_id) { + if ($category_id == $skip_category) { + continue; + } $cached_path[$main_category_id][$category_id] = $category_names[$category_index]; } }