Module:Sandbox/ChaoticShadow/InfoboxBuilder: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
paramnames = {}, |
paramnames = {}, |
||
args = {}, |
args = {}, |
||
final_args = {}, |
|||
proto_infobox = {}, |
|||
infobox = mw.html.create('table'):addClass('infobox'), |
infobox = mw.html.create('table'):addClass('infobox'), |
||
finished = false |
finished = false |
||
Line 181: | Line 183: | ||
end |
end |
||
local arg = self.args[param] or self.params[param].default |
local arg = self.args[param] or self.params[param].default |
||
if arg == nil then |
|||
error("Error") |
|||
end |
|||
if argparams['type'] == 'function' then |
if argparams['type'] == 'function' then |
||
Line 245: | Line 251: | ||
local _cell = self.infobox:tag('tr'):tag('td') |
local _cell = self.infobox:tag('tr'):tag('td') |
||
local content = '?' |
local content = '?' |
||
-- local actual_args = {} |
|||
-- for i,v in ipairs(argt) do |
|||
-- local c = v.content |
|||
-- if v.tag == 'argtd' then |
|||
-- c = self:getContent(c) |
|||
-- end |
|||
-- if c == nil then |
|||
-- end |
|||
-- table.insert(actual_args, i, c) |
|||
-- end |
|||
if #argt < 2 then |
if #argt < 2 then |