Index: kernel/managers/rewrite_url_processor.php =================================================================== --- kernel/managers/rewrite_url_processor.php (revision 15252) +++ kernel/managers/rewrite_url_processor.php (working copy) @@ -669,14 +669,19 @@ * * @param int|Array $category * @param string $module_prefix + * @param int $theme_id * @return string * @access public * @todo Move to kPlainUrlProcessor */ - public function GetItemTemplate($category, $module_prefix) + public function GetItemTemplate($category, $module_prefix, $theme_id = null) { + if ( !isset($theme_id) ) { + $theme_id = $this->Application->GetVar('m_theme'); + } + $category_id = is_array($category) ? $category['CategoryId'] : $category; - $cache_key = __CLASS__ . '::' . __FUNCTION__ . '[%CIDSerial:' . $category_id . '%]:' . $module_prefix; + $cache_key = __CLASS__ . '::' . __FUNCTION__ . '[%CIDSerial:' . $category_id . '%][%ThemeIDSerial:' . $theme_id . '%]' . $module_prefix; $cached_value = $this->Application->getCache($cache_key); if ( $cached_value !== false ) { Index: units/helpers/mod_rewrite_helper.php =================================================================== --- units/helpers/mod_rewrite_helper.php (revision 15165) +++ units/helpers/mod_rewrite_helper.php (working copy) @@ -272,7 +272,7 @@ if ( $cat_item !== false ) { // item found $module_prefix = $cat_item['ItemPrefix']; - $item_template = $rewrite_processor->GetItemTemplate($cat_item, $module_prefix); + $item_template = $rewrite_processor->GetItemTemplate($cat_item, $module_prefix, $vars['m_theme']); // converting ResourceId to corresponding Item id $module_config = $this->Application->getUnitOptions($module_prefix); @@ -319,7 +319,7 @@ WHERE c.CategoryId = ' . (int)$vars['m_cat_id']; $cat_item = $this->Conn->GetRow($sql); - $item_template = $rewrite_processor->GetItemTemplate($cat_item, 'bb'); + $item_template = $rewrite_processor->GetItemTemplate($cat_item, 'bb', $vars['m_theme']); if ($item_template) { $vars['t'] = $item_template;