summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/ucode/runtime.uc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/ucode/runtime.uc')
-rw-r--r--modules/luci-base/ucode/runtime.uc6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/luci-base/ucode/runtime.uc b/modules/luci-base/ucode/runtime.uc
index 89e396d468..e460127e2c 100644
--- a/modules/luci-base/ucode/runtime.uc
+++ b/modules/luci-base/ucode/runtime.uc
@@ -65,6 +65,12 @@ const Class = {
return access(`${template_directory}/${path}.ut`);
},
+ is_lua_template: function(path) {
+ let vm = this.init_lua(true);
+
+ return vm && access(`${vm.get('_G', 'luci', 'template', 'viewdir')}/${path}.htm`);
+ },
+
render_ucode: function(path, scope) {
let tmplfunc = loadfile(path, { raw_mode: false });