<%- 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 "")%> <%if nnode.subsection then%>

<%=util.pcdata(striptags(translate(nnode.title)))%>

    <%else%>
  • <%=util.pcdata(striptags(translate(nnode.title)))%>
  • <%end end end end top_level = disp.node_childs(cattree) if #top_level > 0 then for _,tl_name in ipairs(top_level) do local tl_obj = cattree.nodes[tl_name] if tl_obj.title == "Commotion" then local l2_level = disp.node_childs(tl_obj) if #l2_level > 0 then for _,l2_name in ipairs(l2_level) do local l2_obj = tl_obj.nodes[l2_name] local href = controller .. "/" .. category .. "/".. section .."/" .. l2_name .. (l2_obj.query and http.build_querystring(l2_obj.query) or "") local l3_level = disp.node_childs(l2_obj) if #l3_level > 0 then%>
    <%if l2_obj._menu_selected == true then%>
    <%else%>
    <%end%>

    <%=util.pcdata(striptags(translate(l2_obj.title)))%>

    <%if l2_obj._menu_selected == true then%>
      <%submenu("/" .. category .. "/".. section .."/" .. l2_name .. "/", l2_obj)%>
    <%end%>
    <%else%> <%if l2_obj._menu_selected == true then%>
    <%else%>
    <%end%>

    <%=util.pcdata(striptags(translate(l2_obj.title)))%>

    <%- end end end end end end %>

    <%:Advanced%>