summaryrefslogtreecommitdiffhomepage
path: root/examples/ffluci/controller/public/example-simpleview.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ffluci/controller/public/example-simpleview.lua')
-rw-r--r--examples/ffluci/controller/public/example-simpleview.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/ffluci/controller/public/example-simpleview.lua b/examples/ffluci/controller/public/example-simpleview.lua
new file mode 100644
index 0000000000..61f4ad32cd
--- /dev/null
+++ b/examples/ffluci/controller/public/example-simpleview.lua
@@ -0,0 +1,27 @@
+-- This example demonstrates the simple view dispatcher which is the
+-- most simple way to provide content as it directly renders the
+-- associated template
+
+-- This example consists of:
+-- ffluci/controller/index/example-simpleview.lua (this file)
+-- ffluci/view/example-simpleview/index.htm (the template for action "index")
+-- ffluci/view/example-simpleview/foo.htm (the template for action "foo")
+-- ffluci/i18n/example-simpleview.de (the german language file for this module)
+
+-- Try the following address(es) in your browser:
+-- ffluci/index/example-simpleview
+-- ffluci/index/example-simpleview/index
+-- ffluci/index/example-simpleview/foo
+
+module(..., package.seeall)
+
+dispatcher = require("ffluci.dispatcher").simpleview
+
+menu = {
+ descr = "Example Simpleview",
+ order = 20,
+ entries = {
+ {action = "index", descr = "Simpleview Index"},
+ {action = "foo", descr = "Simpleview Foo"}
+ }
+} \ No newline at end of file