Módulo:Grid/Image list

local p = {} function p.list( f ) local args = f.args local images = f:preprocess( '{{#dpl:namespace=File|category=' .. ( args[1] or ) .. ' grid images|format=,%PAGE%;}}' ):sub( 1, -2 )

local list = {} for image in mw.text.gsplit( images, ';' ) do local link = image:match( ' (.+)%.' )

table.insert( list, '

  • ' .. image .. ' ' .. link .. '
  • ' ) end local heading = '===' .. ( args[2] or '[[' .. args[1] .. ']]' ) .. '===' return heading .. '\n

      \n' .. table.concat( list, '\n' ) .. '\n

    '

    end return p