diff --git a/themes/freifunk/luasrc/view/themes/freifunk/header.htm b/themes/freifunk/luasrc/view/themes/freifunk/header.htm
index 023e86a1ed..0580a1866a 100644
--- a/themes/freifunk/luasrc/view/themes/freifunk/header.htm
+++ b/themes/freifunk/luasrc/view/themes/freifunk/header.htm
@@ -11,26 +11,34 @@ You may obtain a copy of the License at
-%>
<%
-require("luci.sys")
-local load1, load5, load15 = luci.sys.loadavg()
-local request = require("luci.dispatcher").context.path
-local category = request[1]
-local tree = luci.dispatcher.node()
-local cattree = category and luci.dispatcher.node(category)
-local node = luci.dispatcher.context.dispatched
-local hostname = luci.sys.hostname()
+ local sys = require "luci.sys"
+ local http = require "luci.http"
+ local disp = require "luci.dispatcher"
-local c = tree
-for i,r in ipairs(request) do
- if c.nodes and c.nodes[r] then
- c = c.nodes[r]
- c._menu_selected = true
+ local hostname = sys.hostname()
+ local load1, load5, load15 = sys.loadavg()
+
+ local request = disp.context.path
+ local category = request[1]
+ local cattree = category and disp.node(category)
+
+ local tree = disp.node()
+ local node = disp.context.dispatched
+
+ local categories = disp.node_childs(tree)
+
+ local c = tree
+ local i, r
+
+ -- tag all nodes leading to this page
+ for i, r in ipairs(request) do
+ if c.nodes and c.nodes[r] then
+ c = c.nodes[r]
+ c._menu_selected = true
+ end
end
-end
-
-require("luci.i18n").loadc("base")
-require("luci.http").prepare_content("text/html")
+ http.prepare_content("text/html")
-%>
@@ -62,7 +70,7 @@ require("luci.http").prepare_content("text/html")
-
+
-<%:Path%>: <%
-local c = tree
-local url = controller
-for k,v in pairs(request) do
- if c.nodes and c.nodes[v] then
- c = c.nodes[v]
- url = url .. "/" .. v
- %>
<%=pcdata(striptags(translate(c.title) or v))%> <% if k ~= #request then %>» <% end
+<%:Path%>:
+<%
+ local c = tree
+ local url = controller
+ for i, r in ipairs(request) do
+ if c.nodes and c.nodes[r] then
+ c = c.nodes[r]
+ url = url .. "/" .. r
+%>
+
<%=pcdata(striptags(translate(c.title) or v))%>
+ <% if k ~= #request then %> » <% end %>
+<%
+ end
end
-end
%>