Module:XVideosRedList: Difference between revisions
Content deleted Content added
PeaceDeadC (talk | contribs) No edit summary |
PeaceDeadC (talk | contribs) No edit summary |
||
Line 124:
end
-- Function to format country flag using
-- @param country string: The country code or name
-- @param frame table: The current frame object for template expansion
-- @return string: Formatted country flag or empty string if country is nil or empty
local function formatCountryFlag(country, frame)
if not country or country == "" then
return ""
end
-- Use frame:expandTemplate to process the flagicon template
local flagTemplate = frame:expandTemplate{
title = 'flagicon',
args = { country }
}
return flagTemplate .. ' '
end
Line 206 ⟶ 213:
local channelUrl = ""
local channelDisplay = channel.name
local countryFlag = formatCountryFlag(channel.country, frame)
if channel.channel and channel.channel ~= '' then
| |||