FANDOM


local utils = require('Module:Utils')
 
local p = {}
 
p.generateTable = utils.make_wrapper_function(function(args)
    local str = [[{| class="article-table"
! style="text-align:center;"|Name
! style="text-align:center;"|Image
|-]]
    local items = {}
    local images = {}
    for i,v in pairs(args) do
        if (i-1)%2 == 0 then
            table.insert(items,v)
        else
            table.insert(images,v)
        end
    end
    for i,v in pairs(items) do
        str = str .. '\n| style="text-align:center;"|' .. "[[Catalog:" .. v .. "|".. v .. "]]" .. '\n| style="text-align:center;"|' .. images[i] .. "\n|-"
    end
    str = str .. '\n|}'
    return str
end,true)
 
return p
Community content is available under CC-BY-SA unless otherwise noted.