Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r9713 -r9715 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 9713) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 9715) @@ -195,6 +195,7 @@ function CategoryLink($params) { $category_id = getArrayValue($params, 'cat_id'); + if ($category_id === false) { $category_id = $this->Application->GetVar($this->getPrefixSpecial().'_id'); } @@ -263,33 +264,38 @@ $category_path = explode('|', substr($object->GetDBField('ParentPath'), 1, -1)); $module_info = $category_helper->getCategoryModule($params, $category_path); - // 2. get item template by current category & module prefix - $mod_rewrite_helper = $this->Application->recallObject('ModRewriteHelper'); - /* @var $mod_rewrite_helper kModRewriteHelper */ + // WORK AROUND -- TODO + if ($module_info['Var'] != 'cms') { - $category_params = Array ( - 'CategoryId' => $object->GetID(), - 'ParentPath' => $object->GetDBField('ParentPath'), - ); - $item_template = $mod_rewrite_helper->GetItemTemplate($category_params, $module_info['Var']); + // 2. get item template by current category & module prefix + $mod_rewrite_helper = $this->Application->recallObject('ModRewriteHelper'); + /* @var $mod_rewrite_helper kModRewriteHelper */ - if ($this->Application->GetVar('t') == $item_template) { - // we are located on item's details page - $item =& $this->Application->recallObject($module_info['Var']); - /* @var $item kCatDBItem */ + $category_params = Array ( + 'CategoryId' => $object->GetID(), + 'ParentPath' => $object->GetDBField('ParentPath'), + ); - // 3. get item's meta data - $value = $item->GetField('Meta'.$meta_type); + $item_template = $mod_rewrite_helper->GetItemTemplate($category_params, $module_info['Var']); + + if ($this->Application->GetVar('t') == $item_template) { + // we are located on item's details page + $item =& $this->Application->recallObject($module_info['Var']); + /* @var $item kCatDBItem */ + + // 3. get item's meta data + $value = $item->GetField('Meta'.$meta_type); + if ($value) { + return $value; + } + } + + // 4. get category meta data + $value = $object->GetField('Meta'.$meta_type); if ($value) { return $value; } } - - // 4. get category meta data - $value = $object->GetField('Meta'.$meta_type); - if ($value) { - return $value; - } } // 5. get default meta data