diff --git a/includes/functions.php b/includes/functions.php index 19bc4eaa..ab8036a7 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -542,11 +542,15 @@ function ConvertToSecurity($security) /** * Renders a simple PHP template */ -function renderTemplate($name, $__template_data = []) +function renderTemplate($name, $__template_data = [], $pluginName = null) { - $file = realpath(dirname(__FILE__) . "/../templates/$name.php"); + if (isset($pluginName)) { + $file = realpath(dirname(__FILE__) . "/../plugins/$pluginName/templates/$name.php"); + } else { + $file = realpath(dirname(__FILE__) . "/../templates/$name.php"); + } if (!file_exists($file)) { - return "template $name ($file) not found"; + return "
template $name ($file) not found"; } if (is_array($__template_data)) { @@ -1029,3 +1033,10 @@ function renderStatus($hostapd_led, $hostapd_status, $memused_led, $memused, $cp