Index: branches/5.0.x/core/kernel/processors/main_processor.php =================================================================== diff -u -N -r12589 -r12666 --- branches/5.0.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 12589) +++ branches/5.0.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 12666) @@ -1,6 +1,6 @@ Application->GetVar('admin'); + $included = Array (); + foreach ($this->Application->ModuleInfo as $module_name => $module_data) { $module_key = mb_strtolower($module_name); @@ -598,10 +600,18 @@ // Front-End still relies on In-Portal module $module_prefix = $module_data['TemplatePath']; } + elseif ($this->Application->IsAdmin()) { + $module_prefix = $module_data['Path']; // was $module_key . '/'; + } else { - $module_prefix = $this->Application->IsAdmin() ? $module_key.'/' : rtrim($module_data['TemplatePath'], '/').'/'; + $module_prefix = $module_data['TemplatePath']; // always have trailing "/" } + if (in_array($module_prefix, $included)) { + // template by this path was already included by other module (e.g. in-portal used core's template) + continue; + } + $block_params['t'] = $module_prefix.$this->SelectParam($params, $module_key.'_template,'.$module_key.'_t,template,t'); $check_prefix = $module_data['Var']; @@ -620,6 +630,7 @@ } $ret .= $this->Application->Parser->IncludeTemplate($block_params, isset($block_params['is_silent']) ? 1 : 0); + $included[] = $module_prefix; } return $ret;