Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r11665 -r11682 --- branches/RC/core/kernel/application.php (.../application.php) (revision 11665) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 11682) @@ -672,8 +672,10 @@ FROM '.$table.' WHERE '.$id_field.' = '.$this->Conn->qstr($id); $category_data = $this->Conn->GetRow($sql); + + // only direct links to category pages work (symlinks, container pages and so on won't work) $filename = $category_data['NamedParentPath']; - $this->setCache('category_templates', $id, $category_data['CachedTemplate']); + $this->setCache('category_templates', $id, $filename /*$category_data['CachedTemplate']*/); $this->setCache('category_tree', $id, $category_data['TreeLeft'] . ';' . $category_data['TreeRight']); // $this->setCache('item_templates', $id, $category_data['CachedItemTemplate']); @@ -826,12 +828,12 @@ $this->InitParser(); $t = $this->GetVar('t'); - $cms_handler =& $this->recallObject('st_EventHandler'); - /* @var $cms_handler CategoriesEventHandler */ - if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) { - $t = $cms_handler->GetDesignTemplate(); + $cms_handler =& $this->recallObject('st_EventHandler'); + /* @var $cms_handler CategoriesEventHandler */ + $t = ltrim($cms_handler->GetDesignTemplate(), '/'); + if ($this->isDebugMode()) { $this->Debugger->appendHTML('Design Template: ' . $t . '; CategoryID: ' . $this->GetVar('m_cat_id')); } @@ -1744,7 +1746,7 @@ // $t = $this->getCache('item_templates', $category_id); } elseif ($category_id) { - $t = $this->getCache('category_templates', $category_id); + $t = strtolower( preg_replace('/^Content\//i', '', $this->getCache('category_templates', $category_id)) ); } else { $t = 'index'; @@ -2117,6 +2119,10 @@ */ function &recallObject($name,$pseudo_class=null,$event_params=Array()) { + if ($name == 'c') { + echo ''; + } + $result =& $this->Factory->getObject($name, $pseudo_class, $event_params); return $result; }