Module:Item tooltip

local p = {}

function p.Main( frame ) local cargo = mw.ext.cargo local text = '{| class="nano-tooltip nomobile" id="' ..frame.args[1].. '-tooltip"' tables = 'Objects' fields = 'Image,Description' local args = { where = '_pageName = "' .. frame.args[1] .. '"', limit = 1 }   local results = cargo.query( tables, fields, args ) for i, v in ipairs(results) do text = text .. '\n!\n!'.. frame.args[1] ..'\n|-\n' if v["Description"] ~= '' then text = text .. '|style="vertical-align:middle; width:64px"| ' text = text .. '\n| '..v["Description"]..' ' end end text = text .. "\n|}" return text end

return p