1,994 Pages

Documentation for this module may be created at Module:Icon/doc

--<nowiki>
local Icon = {}
local getArgs = require('Dev:Arguments').getArgs
local data = mw.loadData("Module:Icon/data")

function Icon.main(frame) -- Implements {{icon|1=icon}}
	local args = getArgs(frame)
	
    local icon = ''
    if (args['icon'] or args[1]) then 
        icon = (args['icon'] or args[1])
        icon = string.lower(icon)
        local result = data[icon]:gsub("|", "|alt=")
        return string.format('['..'['..'File:'..result..'|link=]]')
    end
end
 
return Icon

--</nowiki>
--[[Category:Modules]]
Community content is available under CC-BY-SA unless otherwise noted.