Module:TeamTotoSandbox: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 47: | Line 47: | ||
function p.main(frame) | function p.main(frame) | ||
-- [Process arguments. Header and image work ok, but | |||
-- additional logic is needed to separate the other args into rows] | |||
local args = require( 'Module:ProcessArgs' ).merge( true ) | local args = require( 'Module:ProcessArgs' ).merge( true ) | ||
local infoboxargs = { | local infoboxargs = { | ||
Line 52: | Line 54: | ||
['rows'] = args['rows'] | ['rows'] = args['rows'] | ||
} | } | ||
return infobox.infobox(args) | return infobox.infobox(args) | ||
end | end | ||
function h. | function h.addrow(row) | ||
-- [ Add html row with given table. I basically just rewrote | |||
-- Template:Infobox row in lua. likely needs to be refactored] | |||
local output = {} | local output = {} | ||
local label = row[1] | local label = row[1] | ||
Line 72: | Line 77: | ||
end | end | ||
output.append('\n|' .. field .. '\n|-') | output.append('\n|' .. field .. '\n|-') | ||
end | end | ||
return p | return p |