Jump to content

Module:Sandbox/Cabayi

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Cabayi (talk | contribs) at 15:43, 27 April 2016 (t). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}

p.hansard = function(frame)
-- get from wikidata
local entity = mw.wikibase.getEntity()
local out = {}
for v in (entity.claims.p463) do
    out[#out + 1] = "[[" .. mw.wikibase.sitelink("Q" .. v.mainsnak.datavalue.value["numeric-id"]) .. "]]"
end
-- TODO: hlist return
return table.concat(out, ", ")
end

return p