diff --git a/libraries/src/MVC/View/HtmlView.php b/libraries/src/MVC/View/HtmlView.php index feaa1e46d1025..b76f2636fc4c7 100644 --- a/libraries/src/MVC/View/HtmlView.php +++ b/libraries/src/MVC/View/HtmlView.php @@ -382,8 +382,8 @@ public function loadTemplate($tpl = null) // Change the template folder if alternative layout is in different template if (isset($layoutTemplate) && $layoutTemplate !== '_' && $layoutTemplate != $template->template) { $this->_path['template'] = str_replace( - JPATH_THEMES . DIRECTORY_SEPARATOR . $template->template, - JPATH_THEMES . DIRECTORY_SEPARATOR . $layoutTemplate, + JPATH_THEMES . DIRECTORY_SEPARATOR . $template->template . DIRECTORY_SEPARATOR, + JPATH_THEMES . DIRECTORY_SEPARATOR . $layoutTemplate . DIRECTORY_SEPARATOR, $this->_path['template'] ); }