Difference between revisions of "Module:Sandbox/Tom Morris"

From blackwiki
Jump to navigation Jump to search
blackwiki>Tom Morris
(debugging some more)
blackwiki>Tom Morris
(turning into link)
Line 4: Line 4:
 
     local entity = mw.wikibase.getEntity()
 
     local entity = mw.wikibase.getEntity()
 
     local label = mw.wikibase.sitelink("Q" .. entity.claims.p26[0].mainsnak.datavalue.value["numeric-id"])
 
     local label = mw.wikibase.sitelink("Q" .. entity.claims.p26[0].mainsnak.datavalue.value["numeric-id"])
     return label
+
     return "[[" .. label .. "]]"
 
end
 
end
  
 
return p
 
return p

Revision as of 13:56, 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.sitelink("Q" .. entity.claims.p26[0].mainsnak.datavalue.value["numeric-id"])
    return "[[" .. label .. "]]"
end

return p