[luci] changing theme at runtime
Federico Fissore
federico at fissore.org
Fri May 17 16:50:53 CEST 2013
Hi everyone
I would like to customize luci so that when a first time user reaches
it, a super simple panel is showed, with a custom branded theme
He/She can then switch to "advanced mode" and access all the settings
I've tried with this code (and a few others, but this is the last one)
function index()
function prepare(page)
require("luci.template").context.viewns.media =
luci.config.themes.MyTheme
return require("luci.dispatcher").template(page)
end
entry({"supersimple"}, prepare("index"), _("Super Simple Web Panel"),
10).dependent=false
end
and it's complaining with "attempt to index field 'viewns' (a nil value)"
Any hint?
Thank you in advance
Federico
More information about the luci
mailing list