Module:HeroData/nav: Difference between revisions

Jump to navigation Jump to search
No edit summary
gallery works now
Line 167: Line 167:


     local heroes = get_heroes(in_herolabs)
     local heroes = get_heroes(in_herolabs)
     local parts = {}
 
     local ret = ''


     for _, hero in ipairs(heroes) do
     for _, hero in ipairs(heroes) do
    local start_gallery = '<gallery>'
         ret = ret .. 'File:' .. hero.name .. file_name .. '|' .. hero.name .. description .. '\n'
         local end_gallery = '</gallery>'
 
        local item
            item = 'File:' .. hero.name .. file_name .. '|'.. hero.name .. description ..  
        table.insert(parts, item)
     end
     end
 
   
     local ret = table.concat(start_gallery, parts, end_gallery)
     ret = '<gallery>'..ret..'</gallery>'


     if debug_mode then
     if debug_mode then