Module:Choose alt
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Choose alt/doc
local p = {}
function p.alt(frame)
if frame == mw.getCurrentFrame() then
args = frame:getParent().args
else
args = frame
end
local value = frame['value']
local num = tonumber(value)
if num ~= nil then
return frame[n + 1]
elseif frame[value] == nil then
return frame[1]
else
return frame[value]
end
end
return p