Module:Image tabber

local function imagetabby( frame ) local args = frame:getParent.args -- find all the nonempty image numbers local imagenums = {} local imagecount = 0 for k, v in pairs( args ) do		local i = tonumber(tostring(k):match( '^%s*image([%d]+)%s*$' ) or '0') if( i > 0 and isnotempty(v) ) then table.insert( imagenums, i ) imagecount = imagecount + 1 end end table.sort(imagenums) local toRender = " \n" for j = 1, imagecount do toRender = toRender .. args['caption' .. i] .. "= \n|-|\n" end toRender = toRender .. " " end

local p function p.tabber( frame ) return imagetabby( frame ) end return p