模块:Navbox
可在模块:Navbox/doc创建此模块的帮助文档
local p = {}
local function wvar(frame,arg,def)
if(frame.args[arg]) then
return frame.args[arg]
else
return def
end
end
local function border(arg)
if(arg=="subgroup" or arg=="child")
then
return "</div>"
elseif(arg=="none")
then
return ""
else
local table = mw.html.create( 'table' )
return '<table class="navbox {{{class|}}}" cellspacing="0" style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">'
end
end
function p.navbox(frame)
mw.logObject(mw.dumpObject(frame.args))
return wvar(frame,'nonono',"none") .. mw.dumpObject(frame.args)
end
return p