Index: trunk/core/units/general/helpers/category_helper.php =================================================================== diff -u -N -r8718 -r8751 --- trunk/core/units/general/helpers/category_helper.php (.../category_helper.php) (revision 8718) +++ trunk/core/units/general/helpers/category_helper.php (.../category_helper.php) (revision 8751) @@ -6,24 +6,27 @@ { $main_category_id = isset($params['cat_id']) ? $params['cat_id'] : $this->Application->GetVar('m_cat_id'); - $ret = $this->getHomeCategoryPath($params); + $home_element = $this->getHomeCategoryPath($params); if (!getArrayValue($params, 'titles') && !getArrayValue($params, 'templates')) { // no static templates given, show only category path - return $ret . $this->getCategoryPath($main_category_id, $params); + return $home_element . $this->getCategoryPath($main_category_id, $params); } $navigation_parts = $this->getNavigationParts($params['titles'], $params['templates']); + $ret = ''; $block_params = Array ('category' => 0); $block_params['separator'] = $params['separator']; $current_template = $this->Application->GetVar('t'); + $show_category = getArrayValue($params, 'show_category'); foreach ($navigation_parts as $template => $title) { $block_params['template'] = $template; if ($title == '__item__') { - if (getArrayValue($params, 'show_category')) { + if ($show_category) { $ret .= $this->getCategoryPath($main_category_id, $params); + $show_category = false; } $category_path = $this->getCategoryParentPath($main_category_id); @@ -49,7 +52,12 @@ $ret .= $this->Application->ParseBlock($block_params); } - return $ret; + if ($show_category) { + $params['no_current'] = true; + return $home_element . ($show_category ? $this->getCategoryPath($main_category_id, $params) : '') . $ret; + } + + return $home_element . $ret; } /** @@ -88,10 +96,19 @@ $ret = ''; $block_params['category'] = 1; $block_params['separator'] = $params['separator']; + $no_current = isset($params['no_current']) && $params['no_current']; + foreach ($category_path as $category_id => $category_name) { $block_params['cat_id'] = $category_id; $block_params['cat_name'] = $block_params['title'] = $category_name; - $block_params['current'] = ($main_category_id == $category_id) && !$module_item_id ? 1 : 0; + + if ($no_current) { + $block_params['current'] = 0; + } + else { + $block_params['current'] = ($main_category_id == $category_id) && !$module_item_id ? 1 : 0; + } + $block_params['is_module_root'] = $category_id == $module_category_id ? 1 : 0; $block_params['name'] = $this->SelectParam($params, 'render_as,block');