Module:TableUtils

local utils = {}

function genCel(url,icon) local cellStr = "|- align=\"left\"\n|" if icon == nil then cellStr = cellStr .." " else cellStr = cellStr .. " "   end cellStr = cellStr..url.." template\n"

local ext = {".png",".psd",".pdn",".xcf",".ora"} for i=1,#ext do       local link = "|.." Link] \n" cellStr = cellStr ..link end return cellStr end

function utils.createTable(frame) local args = frame:getParent.args --local args = frame local i = 1 local renTable = "" while args["url"..i] ~= nil do       renTable = renTable .. genCel(args["url"..i],args["icon"..i]) i = i +1 end return renTable end

return utils