 class="mainmenu">
<%-
local function submenu(prefix, node)
	if not node.nodes or node.hidden then
		return false
	end
	local index = {}
	local count = 0
	for k, n in pairs(node.nodes) do
		if n.title and n.target then
			table.insert(index, {name=k, order=n.order or 100})
			count = count + 1
		end
	end

	table.sort(index, function(a, b) return a.order < b.order end)

	if count > 0 then
%>
	<ul>
	<%- for j, v in pairs(index) do
		if not v.hidden and #v.name > 0 then
			local nnode = node.nodes[v.name]
			l