61f4ad32cda0cd5dbb69cfaa52a607fe81368096
[project/luci.git] / examples / ffluci / controller / public / example-simpleview.lua
1 -- This example demonstrates the simple view dispatcher which is the
2 -- most simple way to provide content as it directly renders the
3 -- associated template
4
5 -- This example consists of:
6 -- ffluci/controller/index/example-simpleview.lua (this file)
7 -- ffluci/view/example-simpleview/index.htm (the template for action "index")
8 -- ffluci/view/example-simpleview/foo.htm (the template for action "foo")
9 -- ffluci/i18n/example-simpleview.de (the german language file for this module)
10
11 -- Try the following address(es) in your browser:
12 -- ffluci/index/example-simpleview
13 -- ffluci/index/example-simpleview/index
14 -- ffluci/index/example-simpleview/foo
15
16 module(..., package.seeall)
17
18 dispatcher = require("ffluci.dispatcher").simpleview
19
20 menu = {
21 descr = "Example Simpleview",
22 order = 20,
23 entries = {
24 {action = "index", descr = "Simpleview Index"},
25 {action = "foo", descr = "Simpleview Foo"}
26 }
27 }