Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r9696 -r9704 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 9696) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 9704) @@ -255,42 +255,43 @@ /* @var $object CategoriesItem */ $meta_type = $params['name']; + if ($object->isLoaded()) { + // 1. get module prefix by current category + $category_helper =& $this->Application->recallObject('CategoryHelper'); + /* @var $category_helper CategoryHelper */ - // 1. get module prefix by current category - $category_helper =& $this->Application->recallObject('CategoryHelper'); - /* @var $category_helper CategoryHelper */ + $category_path = explode('|', substr($object->GetDBField('ParentPath'), 1, -1)); + $module_info = $category_helper->getCategoryModule($params, $category_path); - $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 */ - // 2. get item template by current category & module prefix - $mod_rewrite_helper = $this->Application->recallObject('ModRewriteHelper'); - /* @var $mod_rewrite_helper kModRewriteHelper */ + $category_params = Array ( + 'CategoryId' => $object->GetID(), + 'ParentPath' => $object->GetDBField('ParentPath'), + ); + $item_template = $mod_rewrite_helper->GetItemTemplate($category_params, $module_info['Var']); - $category_params = Array ( - 'CategoryId' => $object->GetID(), - 'ParentPath' => $object->GetDBField('ParentPath'), - ); - $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 */ - 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; + } + } - // 3. get item's meta data - $value = $item->GetField('Meta'.$meta_type); + // 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 switch ($meta_type) { case 'Description':