diff options
author | Steven Barth <steven@midlink.org> | 2009-03-27 00:10:17 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-03-27 00:10:17 +0000 |
commit | 8fdb12c4d12c67d101f0c273d3484658a0c3f6b9 (patch) | |
tree | f536619e72bc2e74847e28805d1e190b253ed3ff | |
parent | 8368432a63567d73101a9ea05f7f862065ba0cff (diff) |
Introduce noheader and nofooter CBI-Dispatcher config
-rw-r--r-- | libs/web/luasrc/dispatcher.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/web/luasrc/dispatcher.lua b/libs/web/luasrc/dispatcher.lua index 0d48acd14..89fa0d22f 100644 --- a/libs/web/luasrc/dispatcher.lua +++ b/libs/web/luasrc/dispatcher.lua @@ -672,14 +672,18 @@ local function _cbi(self, ...) local pageaction = true http.header("X-CBI-State", state or 0) - tpl.render("cbi/header", {state = state}) + if not config.noheader then + tpl.render("cbi/header", {state = state}) + end for i, res in ipairs(maps) do res:render() if res.pageaction == false then pageaction = false end end - tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply}) + if not config.nofooter then + tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply}) + end end --- Create a CBI model dispatching target. |