Module:InfoboxCustom: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 14: Line 14:
     infobox:addClass('infobox-' .. divclass);
     infobox:addClass('infobox-' .. divclass);


    local i = 1;
     for k, v in spairs(args) do
     for k, v in spairs(args) do
         if string.match(k, 'data[0-9]+') ~= nil then
         if string.match(k, 'data[0-9]+') ~= nil then
            local i = k:gsub('data', '');
             addField('data' .. i, args['label' .. i])
             addField('data' .. i, args['label' .. i])
            i = i + 1
         end
         end
     end
     end