Module:Mod List

local p = {}

p.sort = function(cat, lang) if f ~= mw.getCurrentFrame then f = mw.getCurrentFrame end args = f:getParent.args list = "" if lang == "" then list = f:callParserFunction{name = "#dpl:", args = {namespace = "", category = cat, nottitlematch = '%/%', allowcachedresults = "true"}} else list = f:callParserFunction{name = "#dpl:", args = {namespace = "", category = cat .. lang, titlematch = '%' .. lang, allowcachedresults = "true"}} end

list = list:gsub("", "¦"):sub(9,-11) local mods = {} for mod in list:gmatch("([^¦]+)") do           table.insert(mods,mod) end table.sort(mods) local list = "" for _,mod in ipairs(mods) do           list = list .. mod .. " &bull; " end return list:sub(1,-20) end

p.major = function(params) return p.sort("Mods", params.args.lang) end

p.minor = function(params) return p.sort("Minor Mods", params.args.lang) end

return p