Introduce luci.dispatcher.get(...) which works like node(...) but does
authorSteven Barth <steven@midlink.org>
Thu, 26 Feb 2009 17:08:41 +0000 (17:08 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 26 Feb 2009 17:08:41 +0000 (17:08 +0000)
not disable the autocreated flag and does not overwrite the target
controller so that call()-targets won't loose their binding to their
controller

libs/web/luasrc/dispatcher.lua

index 6914ffb..60d468e 100644 (file)
@@ -513,6 +513,14 @@ function entry(path, target, title, order)
        return c
 end
 
+--- Fetch or create a dispatching node without setting the target module or
+-- enabling the node.
+-- @param      ...             Virtual path
+-- @return                     Dispatching tree node
+function get(...)
+       return _create_node({...})
+end
+
 --- Fetch or create a new dispatching node.
 -- @param      ...             Virtual path
 -- @return                     Dispatching tree node