Changes
update to use mw.html instead of Module:HtmlBuilder - conversion courtesy of User:WOSlinker
local p = {}
local args = {}
local origArgs
local root
local function union(t1, t2)
-- Returns the union of the values of two tables, as a sequence.
if rowArgs.header then
root
elseif rowArgs.data then
local row = root.:tag('tr') row.:addClass(rowArgs.rowclass) row.:attr('id', rowArgs.rowid)
if rowArgs.label then
row
end
local dataCell = row.:tag('td')
if not rowArgs.label then
dataCell
end
dataCell
end
end
root
end
root
end
root
end
for k, num in ipairs(imagenums) do
local caption = args['caption' .. tostring(num)]
local data = HtmlBuildermw.html.create().:wikitext(args['image' .. tostring(num)])
if caption then
data
end
addRow({
root
title = 'navbar',
args = { args.name, mini = 1 }
local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
root.:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
end
end
if args.decat ~= 'yes' then
if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
root.:wikitext('[[Category:Articles which use infobox templates with no data rows]]')
end
if args.child == 'yes' and args.title then
root.:wikitext('[[Category:Articles which use embedded infobox templates with the title parameter]]')
end
end
-- if the infobox is used as a 'child' inside another infobox.
if args.child ~= 'yes' then
root = HtmlBuildermw.html.create('table')
root
if args.subbox == 'yes' then
root
else
root
end
root
renderTitle()
renderAboveRow()
else
root = HtmlBuildermw.html.create()
root
end