local tmpl = require("ffluci.template")
local cbi = require("ffluci.cbi")
+ local path = request.category.."_"..request.module.."/"..request.action
+
i18n.loadc(request.module)
- stat, map = pcall(cbi.load, request.module.."/"..request.action)
+ stat, map = pcall(cbi.load, path)
if stat then
- tmpl.render("header")
+ tmpl.render("cbi/header")
map:render()
- tmpl.render("footer")
+ tmpl.render("cbi/footer")
else
disp.error404()
end
return
end
- if pcall(tmpl.render, request.module .. "/" .. request.action) then
+ local path = request.category.."_"..request.module.."/"..request.action
+ if pcall(tmpl.render, path) then
return
end
- stat, map = pcall(cbi.load, request.module.."/"..request.action)
+ stat, map = pcall(cbi.load, path)
if stat then
- tmpl.render("header")
+ tmpl.render("cbi/header")
map:render()
- tmpl.render("footer")
+ tmpl.render("cbi/footer")
return
end
local tmpl = require("ffluci.template")
local disp = require("ffluci.dispatcher")
+ local path = request.category.."_"..request.module.."/"..request.action
+
i18n.loadc(request.module)
- if not pcall(tmpl.render, request.module .. "/" .. request.action) then
+ if not pcall(tmpl.render, path) then
disp.error404()
end
end
\ No newline at end of file