Jump to content

Module:Sandbox/Edgars2007

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Edgars2007 (talk | contribs) at 13:09, 11 December 2015. The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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