Index: branches/5.2.x/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r16027 -r16308 --- branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 16027) +++ branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 16308) @@ -1,6 +1,6 @@ GetDBField('ParentPath'), 1, -1)); - $module_info = $category_helper->getCategoryModule($params, $category_path); + $module_info = $category_helper->getCategoryModule($params, $category_path); - // In-Edit & Proj-CMS module prefixes doesn't have custom field with item template - if ($module_info && $module_info['Var'] != 'adm' && $module_info['Var'] != 'st') { - + if ( $module_info ) { // 2. get item template by current category & module prefix $rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor'); /* @var $rewrite_processor kRewriteUrlProcessor */ @@ -917,6 +915,30 @@ } /** + * Builds link to a category in the Admin Tree. + * + * @param array $params Tag params. + * + * @return string + */ + protected function AdminTreeLink(array $params) + { + $params['direct_link'] = 1; + $params['pass'] = 'm'; + $params['m_opener'] = 'r'; + + if ( $this->Application->ConfigValue('Catalog_PreselectModuleTab') ) { + $module_prefix = $this->GetModulePrefix($params); + + if ( $module_prefix ) { + $params['anchor'] = 'tab-' . $module_prefix; + } + } + + return $this->CategoryLink($params); + } + + /** * Returns module prefix based on root category for given * * @param Array $params @@ -933,7 +955,8 @@ /* @var $category_helper CategoryHelper */ $module_info = $category_helper->getCategoryModule($params, $parent_path); - return $module_info['Var']; + + return $module_info ? $module_info['Var'] : 'c'; } function ImageSrc($params)