Jump to content

Module:Sandbox/Edgars2007

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Edgars2007 (talk | contribs) at 09:34, 11 August 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
p = {}
p.link = function ( frame )
    local link_available =  ""
    local label = ""
    for i,v in ipairs(frame.args) do
        if ( mw.wikibase.sitelink( frame.args[i] ) ) then
            link_available = link_available .. "[[" .. mw.wikibase.sitelink( frame.args[i] ) .. "]]"
        else
            link_available = link_available .. '<span style="color:red;">' .. label .. '</span>'
        end
    end
    return link_available
end
 
return p