Module:Infobox

local p = {}

function p.main( frame, fields ) local data = require( 'Module:Data' ) local entity = mw.wikibase.getEntity if entity ~= nil then -- Add initial box local out = ' ' -- If fields are provided if next(fields) ~= nil then -- Add fields for index, field in next, fields do				local claim = entity.claims[ field.prop ] -- If property is on item if claim ~= nil then local values = data.claimLabels( field.prop, claim ) out = out .. field.label .. ': ' .. values if index < #fields then out = out .. ' '					end end end end -- Add edit button and close box out = out .. ' '		return out else return 'Please link an item to this page.' end end

return p