diff --git a/library/think/template.php b/library/think/template.php index 39770b1f..0085fe87 100644 --- a/library/think/template.php +++ b/library/think/template.php @@ -808,7 +808,7 @@ class Template private function parseTemplateFile($template) { if (false === strpos($template, '.')) { - return $this->config['tpl_path'] . $template . $this->config['tpl_suffix']; + return (defined('THEME_PATH') && substr_count($template, '/') < 2 ? THEME_PATH : $this->config['tpl_path']) . $template . $this->config['tpl_suffix']; } else { return $template; }