diff --git a/components/ILIAS/UICore/classes/class.ilTemplate.php b/components/ILIAS/UICore/classes/class.ilTemplate.php index 5a7e38ffe6f2..8d6b16aff4d4 100755 --- a/components/ILIAS/UICore/classes/class.ilTemplate.php +++ b/components/ILIAS/UICore/classes/class.ilTemplate.php @@ -376,15 +376,23 @@ protected function getTemplatePath(string $a_tplname, string $a_in_module = ''): } $style = $this->getCurrentStyle(); - $base_path .= 'public/Customizing/skin/' . $skin . '/' . $style; + $base_path = $ilias_root . 'public/Customizing/skin/' . $skin; if ($a_in_module === 'components/ILIAS/UI/src') { $a_in_module = 'UI'; } + $from_style = $base_path . '/' . $style . '/' . $a_in_module . '/' . $a_tplname; + if ($this->fileexistsinskin($from_style)) { + return $from_style; + } + $from_skin = $base_path . '/' . $a_in_module . '/' . $a_tplname; + if ($this->fileexistsinskin($from_skin)) { + return $from_skin; + } - return $this->fileExistsInSkin($from_skin) ? $from_skin : $default; + return $default; } /**