Difference between revisions of "Module:Sandbox/Tom Morris"
Jump to navigation
Jump to search
blackwiki>Tom Morris (string "1" rather than 1) |
blackwiki>Tom Morris (debugging) |
||
| Line 4: | Line 4: | ||
local entity = mw.wikibase.getEntity() | local entity = mw.wikibase.getEntity() | ||
local label = type(entity.claims.p26["1"]) | local label = type(entity.claims.p26["1"]) | ||
| − | return | + | local out = {} |
| + | for k, v in pairs(entity.claims.p26) do | ||
| + | out[#out + 1] = k | ||
| + | end | ||
| + | return table.concat(out, ", ") | ||
end | end | ||
return p | return p | ||
Revision as of 13:37, 19 May 2013
Documentation for this module may be created at Module:Sandbox/Tom Morris/doc
local p = {}
p.spouse = function(frame)
local entity = mw.wikibase.getEntity()
local label = type(entity.claims.p26["1"])
local out = {}
for k, v in pairs(entity.claims.p26) do
out[#out + 1] = k
end
return table.concat(out, ", ")
end
return p