Module:Infobox

local p = {}

function p.CreateItemInfobox(item, parent, game) --Header local infobox = mw.html.create("table"):addClass("infoboxtable") :node(mw.html.create("tr")) :node(mw.html.create("th"):addClass("infoboxname"):attr("colspan", 6):wikitext(item["Name"])) --Image infobox:node(mw.html.create("tr"):addClass("infoboximage")		:node(mw.html.create("td"):attr("colspan", 6):wikitext(""))) --Description infobox:node(mw.html.create("tr")		:node(mw.html.create("th"):addClass("infoboxdetails"):attr("colspan", 6):wikitext("Description"))) --Type infobox:node(mw.html.create("tr")		:node(mw.html.create("td"):wikitext("Type"))		:node(mw.html.create("td"):attr("colspan", 5):wikitext(parent["Name"]))) --Weight infobox:node(mw.html.create("tr")		:node(mw.html.create("td"):wikitext("Weight"))		:node(mw.html.create("td"):attr("colspan", 5):wikitext(item["UnitWeight"] / 1000 .. " Stones"))) --Length infobox:node(mw.html.create("tr")		:node(mw.html.create("td"):wikitext("Length"))		:node(mw.html.create("td"):attr("colspan", 5):wikitext(item["Length"]))) --ID infobox:node(mw.html.create("tr"):addClass("infoboxID")		:node(mw.html.create("td"):attr("colspan", 8):wikitext("ID " .. item["ID"]))) return infobox end

function p.ItemMain(frame) local args = frame:getParent.args local game = args[1] local itemName = args[2] local data if game == "YO" then data = require("Module:ObjectDataYO") end local item = {} for key, value in ipairs(data) do		if value["Name"] == itemName then item = value break end end local parent = {} for key, value in ipairs(data) do		if value["ID"] == item["ParentID"] then parent = value break end end return p.CreateItemInfobox(item, parent, game) end

return p