Infobox - Daniel Larson Wiki - lolcow.city
Jump to navigation
Jump to search
imported>YungCyraxxAlt (Replaced content with "-- 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"...") |
imported>YungCyraxxAlt (Replaced content with "-- 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"...") |
(No difference)
| |
Revision as of 18:29, 3 May 2023
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