Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r11495 -r11501 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11495) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11501) @@ -1014,9 +1014,18 @@ $template = $this->Application->GetVar('t'); } - if (strtolower($page->GetDBField('NamedParentPath')) != strtolower('Content/'.$template)) { - // load, when used page object doesn't match requested page object - $page->Load('Content/'.$template, 'NamedParentPath'); + // different path in structure AND design template differes from requested template + $structure_path_match = strtolower( $page->GetDBField('NamedParentPath') ) == strtolower('Content/' . $template); + $design_match = $page->GetDBField('Template') == $template; + + if (!$structure_path_match && !$design_match) { + // Same sql like in "c:getPassedID". Load, when current page object doesn't match requested page object + $sql = 'SELECT ' . $page->IDField . ' + FROM ' . $page->TableName . ' + WHERE (NamedParentPath = ' . $this->Conn->qstr('Content/' . $template) . ') OR (IsSystem = 1 AND Template = ' . $this->Conn->qstr($template) . ')'; + $page_id = $this->Conn->GetOne($sql); + + $page->Load($page_id); } return $page; @@ -1060,7 +1069,7 @@ if (EDITING_MODE == EDITING_MODE_CMS) { $bg_color = isset($params['bgcolor']) ? $params['bgcolor'] : '#ffffff'; $url_params = Array ( - 'pass' => 'm,st,content', + 'pass' => 'm,' . $this->Prefix . ',content', 'm_opener' => 'd', 'st_id' => $page->GetID(), 'content_id' => $content->GetID(), @@ -1084,7 +1093,7 @@ // link from Front-End to admin, don't remove "index.php" $edit_url = $this->Application->HREF('in-edit/pages/content_edit', ADMIN_DIRECTORY, $url_params, 'index.php'); $button_css = 'font-family: Arial, Verdana; font-size: 9pt; '.$pos_float.' z-index: 99; background-color: #F7C300; color: #CE0031; border: 1px solid #CE0031; padding: 1px 10px 1px 10px; cursor: pointer;'; - $edit_code = '