Module:Flagg: Difference between revisions

Content deleted Content added
add optional |nodata= to avoid country data look up when it doesn't exist
add "l" option and noredlink= and missingcategory= parameters, for compatibility with {{flagicon}}
Line 186:
ilink = "|link="
end
end
if am == "" and string.find(me,"l") then
am = mw.ustring.sub(ilink,7,-1)
end
local image = "[[File:"..iname.."|"..size..border..ilink.."|alt="..am.."]]"
 
if iname==placeholder then
if require('Module:yesno')(args["noredlink"]) == false then
iname = ''
image = "[[:Template:Country data "..country.."]]"
end
if (args["missingcategory"] or '') ~= '' then
image = image..args["missingcategory"]
end
end
 
--Combine image and name with separator