diff options
author | Steven Barth <steven@midlink.org> | 2008-03-10 08:53:14 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-10 08:53:14 +0000 |
commit | 93a98dd13be5127871ff78d85e8199f2df77e9c2 (patch) | |
tree | 9873e6b279893a1f36ce4d361974fd2bd1219d59 /src/ffluci/controller/public/index.lua | |
parent | b827bb905aee48f3c4c8edf9cfc2e8fc9406ba68 (diff) |
Moved examples out of source directory
Added a first draft design
Cleaned up Makefile
Prepared for module development
Diffstat (limited to 'src/ffluci/controller/public/index.lua')
-rw-r--r-- | src/ffluci/controller/public/index.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/ffluci/controller/public/index.lua b/src/ffluci/controller/public/index.lua deleted file mode 100644 index 4498c77edf..0000000000 --- a/src/ffluci/controller/public/index.lua +++ /dev/null @@ -1,32 +0,0 @@ --- This is a very simple example Hello World FFLuCI controller --- See the other examples for more automated controllers - --- Initialise Lua module system -module(..., package.seeall) - --- This is the module dispatcher. It implements the last step of the --- dispatching process. -function dispatcher(request) - require("ffluci.template").render("header") - print("<h2>Hello World!</h2>") - for k,v in pairs(request) do - print("<div>" .. k .. ": " .. v .. "</div>") - end - require("ffluci.template").render("footer") -end - --- The following part is optional it could be useful for menu generators --- An example menu generator is implemented in the template "menu" - -menu = { - -- This is the menu item description - descr = "Hello World", - - -- This is the order level of the menu entry (lowest goes first) - order = 10, - - -- A list of menu entries in the form action => "description" - entries = { - {action = "index", descr = "Hello World"}, - } -}
\ No newline at end of file |