FantasyTeddy (talk | contribs) (Created page with "local p = {} function p.list( f ) local args = f.args local images = mw.text.trim( f:callParserFunction( '#dpl', { allowcachedresults = 'true', namespace = 'File', cat...") |
FantasyTeddy (talk | contribs) mNo edit summary |
||
Line 6: | Line 6: | ||
namespace = 'File', | namespace = 'File', | ||
category = ( args[1] or '' ) .. ' grid images', | category = ( args[1] or '' ) .. ' grid images', | ||
format = ',File:%TITLE%;' | format = ',File:%TITLE%;', | ||
'' | |||
} ), ';' ) | } ), ';' ) | ||
Documentation for this module may be created at Module:Grid/Image list/doc
local p = {}
function p.list( f )
local args = f.args
local images = mw.text.trim( f:callParserFunction( '#dpl', {
allowcachedresults = 'true',
namespace = 'File',
category = ( args[1] or '' ) .. ' grid images',
format = ',File:%TITLE%;',
''
} ), ';' )
local list = {}
for image in mw.text.gsplit( images, ';' ) do
local link = image:match( ' (.+)%.' )
table.insert( list, '<li>[[' .. image .. ']] [[' .. link .. ']]</li>' )
end
return '===' .. ( args[2] or '[[' .. args[1] .. ']]' ) .. '===' ..
'\n<ul style="-moz-columns:250px;-webkit-columns:250px;columns:250px;-moz-column-rule:2px inset #000;-webkit-column-rule:2px inset #000;column-rule:2px inset #000">\n' ..
table.concat( list, '\n' ) ..
'\n</ul>'
end
return p
Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.