Module:Stb row
Appearance
Documentation for this module may be created at Module:Stb row/doc
local p = {}
local getArgs = require("Module:Arguments").getArgs
local columns = require("Module:State tournaments box/common").columns
local valid_keys = {}
for _, column in ipairs(columns) do
table.insert(valid_keys, column.key)
end
function p.main(frame)
local args = getArgs(frame)
local row = mw.html.create("tr")
for _, key in ipairs(valid_keys) do
local cell = mw.html.create("td")
if args[key] == nil then
mw.addWarning("Key \"" .. key .. "\" is missing. Is that intentional?")
else
cell:wikitext(args[key])
end
row:node(cell)
end
return row
end
return p