local getInformation = function(ID, pID, link) local infoTable = mw.wikibase.getBestStatements(ID, pID) local valuesString = "" for idx, v in pairs(infoTable) do if not(v
nil) and link then valuesString = valuesString .. "" .. mw.wikibase.getSitelink(v.mainsnak.datavalue.value.id) .. "" else valuesString = valuesString .. mw.wikibase.getLabel(v.mainsnak.datavalue.value.id) end end end return valuesString or ""end
p =
p.getWikidata = function(frame) local entityID = frame.args.entityid local first = getInformation(entityID, "P735", false) local family = getInformation(entityID, "P734", false) local occupation = getInformation(entityID, "P106", true) local birthPlace = getInformation(entityID, "P19", true) local spouse = getInformation(entityID, "P26", true) fullTable = "
- \ | Name | " .. first .. " " .. family .. "\ | - \ | Place of birth | " .. birthPlace .. "\ | - \ | Occupation | " .. occupation .. "\ | - \ | Spouse | " .. spouse .. "\ |
return p