diff --git a/phplib/Notification.php b/phplib/Notification.php index f5cd9c1..38b6d09 100644 --- a/phplib/Notification.php +++ b/phplib/Notification.php @@ -345,8 +345,17 @@ public static function render($tpl, $vars, $debug_data=[]) { // Render the template. If there's an error, dump the output buffer. ob_start(); + $template_file_list = [ + sprintf('%s/exttemplates/%s.php', BASE_DIR, $tpl), + sprintf('%s/templates/%s.php', BASE_DIR, $tpl), + ]; try { - require(sprintf('%s/templates/%s.php', BASE_DIR, $tpl)); + foreach($template_file_list as $template_file) { + if(file_exists($template_file)) { + require($template_file); + break; + } + } } catch(\Exception $e) { ob_end_clean(); throw $e;