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 = '
Edit
'; + $edit_code = '
Edit
'; if (isset($params['forms_later']) && $params['forms_later']) { $tmp = $edit_code; @@ -1252,7 +1261,7 @@ $page =& $this->_getPage($params); $url_params = Array( - 'pass' => 'm,st', + 'pass' => 'm,' . $this->Prefix, 'm_opener' => 'd', 'st_id' => $page->GetID(), 'st_mode' => 't', @@ -1264,9 +1273,9 @@ 'index_file' => 'index.php', ); - $edit_url = $this->Application->HREF('proj-cms/structure/structure_edit', '/admin', $url_params); + $edit_url = $this->Application->HREF('categories/categories_edit', '/admin', $url_params); $button_css = 'position: absolute; z-index: 1; top: 1; left 1; font-family: Arial, Verdana; font-size: 9px; background-color: #F7C300; color: #CE0031; border: 1px solid #CE0031; width: auto; padding: 2px 10px 2px 10px; cursor: pointer;'; - $edit_code = '
Page Properties'; + $edit_code = '
Page Properties'; $title = $this->PageInfo(array('type' => 'htmlhead_title')); $edit_code .= '
'; @@ -1282,27 +1291,24 @@ $edit_code .= ''; } - /*$browse_url = $this->Application->HREF('index', '/admin', array('m_cat_id'=>1,'m_theme'=>'','admin' => 1, 'pass' => 'm', 'm_opener' => 'r'), '../index.php'); + $url_params = Array('m_theme' => '', 'pass' => 'm', 'm_opener' => 'r', 'no_amp' => 1); + $browse_url = $this->Application->HREF('catalog/catalog', ADMIN_DIRECTORY, $url_params, 'index.php'); + $browse_url = preg_replace('/&(admin|editing_mode)=[\d]/', '', $browse_url); $edit_code .= '
'."\n"; - if ( $.isFunction(window.parent.frames["menu"].SyncActive) ) { - window.parent.frames["menu"].SyncActive("' . $browse_url . '"); - } - } - -
'."\n";*/ - - $edit_code .= ''."\n"; - return $edit_code; } @@ -1566,7 +1572,7 @@ $object =& $this->getObject($params); $template = $object->GetDBField('NamedParentPath'); - $url_params = Array ('admin' => 1, 'pass' => 'm', 'index_file' => 'index.php'); + $url_params = Array ('admin' => 1, 'pass' => 'm', 'm_cat_id' => $object->GetID(), 'index_file' => 'index.php'); return $this->Application->HREF($template, '_FRONT_END_', $url_params); }