Index: trunk/core/units/themes/themes_config.php =================================================================== diff -u -N -r8080 -r8099 --- trunk/core/units/themes/themes_config.php (.../themes_config.php) (revision 8080) +++ trunk/core/units/themes/themes_config.php (.../themes_config.php) (revision 8099) @@ -49,7 +49,9 @@ 'AutoDelete' => true, 'AutoClone' => true, - 'ListSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %s'), + 'ListSQLs' => Array ('' => ' SELECT %1$s.* %2$s + FROM %s + LEFT JOIN '.TABLE_PREFIX.'Stylesheets st ON st.StylesheetId = %1$s.StylesheetId'), 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s FROM %s LEFT JOIN '.TABLE_PREFIX.'Stylesheets st ON st.StylesheetId = %1$s.StylesheetId'), Index: trunk/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r7855 -r8099 --- trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7855) +++ trunk/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 8099) @@ -130,7 +130,25 @@ function FormAction($params) { - return $this->Application->ProcessParsedTag('m', 't', array_merge($params, Array('pass'=>'all,m', 'pass_category' => 1 )) ); + $pass_category = true; + $category_id = $this->Application->GetVar('m_cat_id'); + + if ($category_id > 0) { + $category = $this->Application->recallObject('c'); + /* @var $category kDBItem */ + + $t = $this->Application->GetVar('t'); + if (preg_match('/Content\/'.preg_quote($t, '/').'/i', $category->GetDBField('NamedParentPath'))) { + // category name matches template name -> Proj-CMS/In-Edit tricks + $pass_category = false; + } + } + + $params['pass'] = 'all,m'; + if ($pass_category) { + $params['pass_category'] = 1; + } + return $this->Application->HREF('', '', $params); } /*// NEEDS TEST