Module:For Multi
From Dovedale Railway Wiki
More actions
Documentation for this module may be created at Module:For Multi/doc
local mArguments --initialize lazily
local mHatlist = require('Module:Hatnote list')
local mHatnote = require('Module:Hatnote')
local yesNo = require('Module:Yesno')
local getArgs = require('Module:Arguments').getArgs
local p = {}
--Implements {{For-Multi}}
function p.For (frame)
return p._For_Multi(getArgs(frame))
end
function p._For_Multi (args)
local text = ""
if not args[1] then
table.insert(args,"other uses")
end
for i = 1, 999, 2 do
if not args[i] then break end
text = text..mHatlist.forSeeTableToString({{use = args[i], pages = {args[i+1]}}}).. " "
end
return mHatnote._hatnote(
text,
{
selfref = args.selfref,
icon = 'WikimediaUI-ArticleDisambiguation-ltr.svg'
}
)
end
return p