Module:Official website: Difference between revisions

Content deleted Content added
start converting Template:Official website
 
get Wikidata code working
Line 3:
local p = {}
 
local function fetchWikidataUrl()
fetchWikidataUrl = function()
return 'http://www.example.com'
local success, url = pcall(function ()
return mw.wikibase.getEntityObject().claims.P856[1].mainsnak.datavalue.value
end)
if not success then
url = nil
end
fetchWikidataUrl = function ()
return url
end
return url
end