Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r11648 -r11649 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11648) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11649) @@ -962,7 +962,8 @@ // pass params to block with tab content $params['name'] = $params['render_as']; - $params['prefix'] = trim($this->Prefix.'.'.($tab_params['special'] ? $tab_params['special'] : $this->Special), '.'); + $special = $tab_params['special'] ? $tab_params['special'] : $this->Special; + $params['prefix'] = trim($this->Prefix.'.'.$special, '.'); $prefix_append = $this->Application->GetVar('prefix_append'); if ($prefix_append) { @@ -978,6 +979,10 @@ $params['tab_dependant'] = $tab_params['dependant']; $params['show_category'] = $tab_params['special'] == 'showall' ? 1 : 0; // this is advanced view -> show category name + if ($special == 'showall' || $special == 'user') { + $params['grid_name'] .= 'ShowAll'; + } + return $this->Application->ParseBlock($params, 1); } @@ -997,8 +1002,24 @@ if ($category_path === false) { // not chached if ($category_id > 0) { - $cached_navbar = preg_replace('/^Content&\|&/i', '', $object->GetField('CachedNavbar')); + $cached_navbar = $object->GetField('CachedNavbar'); + if ($category_id == $object->GetDBField('ParentId')) { + // parent category cached navbar is one element smaller, then current ones + $cached_navbar = explode('&|&', $cached_navbar); + array_pop($cached_navbar); + $cached_navbar = implode('&|&', $cached_navbar); + } + else { + // no relation with current category object -> query from db + $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_CachedNavbar + FROM ' . $object->TableName . ' + WHERE ' . $object->IDField . ' = ' . $category_id; + $cached_navbar = $this->Conn->GetOne($sql); + } + + $cached_navbar = preg_replace('/^Content&\|&/i', '', $cached_navbar); + $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $cached_navbar), ' > '); } else {