Index: menu_helper.php =================================================================== --- menu_helper.php (revision 12877) +++ menu_helper.php (working copy) @@ -215,9 +215,12 @@ */ function _removeNonMenuItems($menu) { + $theme_id = $this->Application->GetVar('m_theme'); + foreach ($menu as $menu_index => $menu_item) { // $menu_index is in "cN" format, where N is category id - if (!$menu_item['IsMenu']) { + if (!$menu_item['IsMenu'] || ($menu_item['ThemeId'] != $theme_id && $menu_item['ThemeId'] != 0)) { + // don't show sections, that are not from menu OR system templates from other themes unset($menu[$menu_index]); } } @@ -260,7 +263,7 @@ c.ParentPath AS ParentPath, c.ParentId As ParentId, \'cat\' AS ItemType, - c.IsMenu, c.IsSystem, c.UseExternalUrl, c.ExternalUrl, c.UseMenuIconUrl, c.MenuIconUrl + c.IsMenu, c.IsSystem, c.ThemeId, c.UseExternalUrl, c.ExternalUrl, c.UseMenuIconUrl, c.MenuIconUrl FROM ' . TABLE_PREFIX . 'Category AS c WHERE (c.Status = ' . STATUS_ACTIVE . ') AND (c.ParentId = ' . $parent['CategoryId'] . ')'; $items = array_merge($items, $this->Conn->Query($sql, 'ItemId'));