Difference between revisions of "Module:Sandbox/Tom Morris"
Jump to navigation
Jump to search
blackwiki>Tom Morris (i'm an idiot - zero-indexed is for other languages!) |
blackwiki>Tom Morris (simplifying) |
||
| Line 2: | Line 2: | ||
p.spouse = function(frame) | p.spouse = function(frame) | ||
| − | + | local entity = mw.wikibase.getEntity() | |
| − | + | local label = mw.wikibase.label( "Q" .. entity.claims.p26[1].mainsnak.datavalue.value["numeric-id"]) | |
| − | + | return "[[" + label + "]]" | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
end | end | ||
return p | return p | ||
Revision as of 13:29, 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 = mw.wikibase.label( "Q" .. entity.claims.p26[1].mainsnak.datavalue.value["numeric-id"])
return "[[" + label + "]]"
end
return p