<%-
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local function submenu(prefix, node)
local childs = disp.node_childs(node)
if #childs > 0 then
for i, r in ipairs(childs) do
local nnode = node.nodes[r]
local href = controller .. prefix .. r ..
(nnode.query and http.build_querystring(nnode.query) or "")%>
<%=util.pcdata(striptags(translate(nnode.title)))%>
<%-
end
end
end
childs = disp.node_childs(cattree)
if #childs > 0 and category == "admin" then
for i, r in ipairs(childs) do
local nnode = cattree.nodes[r]
if nnode.title ~= "Commotion" then
local href = controller .. "/" .. category .. "/" .. r ..
(nnode.query and http.build_querystring(nnode.query) or "")
local grandchildren = disp.node_childs(nnode)
if #grandchildren > 0 then%>
<%if nnode._menu_selected == true then%>
<%else%>
<%-
if nnode._menu_selected == true then
-%><%-
-%>
<% else %>
<%if nnode._menu_selected == true then%>
<%else%>
<%-
end
end
end%>
<%else%>
<%end%>