Module:Infobox
Documentation for this module may be created at Module:Infobox/doc
-- This module implements the Infobox template.
local p = {}
function p.infobox(frame)
local args = frame.args
local title = args.title or ''
local image = args.image or ''
local caption = args.caption or ''
local body = args.body or ''
local output = ''
output = output .. '<table class="infobox">\n'
output = output .. '<caption>' .. title .. '</caption>\n'
if image ~= '' then
output = output .. '<tr>\n<td colspan="2" style="text-align:center"><img src="' .. image .. '" alt="' .. caption .. '"></td>\n</tr>\n'
end
if body ~= '' then
output = output .. '<tr>\n<td colspan="2">' .. body .. '</td>\n</tr>\n'
end
output = output .. '</table>'
return output
end
return p