Please join this new Discord server!
Module:Main
From Etrian Odyssey Wiki
- This documentation is transcluded from Module:Main/doc. To edit this documentation, click here.
Builds the list of articles output by Template:Main. This module allows for an indefinite number of articles to be listed by the template.
local p = {}
function p.main(frame)
local args = {}
local labels = {}
local output = ":''Main article"
for i = 1, 10 do
if frame:getParent().args[i] ~= nil then
args[i] = frame:getParent().args[i]
if frame:getParent().args["l" .. i] ~= nil then
args[i] = args[i] .. "|" .. frame:getParent().args["l" .. i]
end
end
end
if #args > 1 then
output = output .. "s: [[" .. mw.text.listToText(args, "]], [[", "]] and [[")
else
output = output .. ": [[" .. args[1]
end
return output .. "]]''"
end
return p