Module:Pagelist

function links( frame ) if frame.args.list == nil then return '' end local list = frame.args.list local items = mw.text.split( list, ';', true ) local outItems = {} for i,item in pairs( items ) do		if item == nil or item == '' then return end outItems[i] =  .. item ..  if frame.args.preload ~= nil then local title = mw.title.new( item ) if title == nil or not title.exists then local editUrl = title:canonicalUrl( { action = 'edit', preload = 'Template:' .. frame.args.preload .. '/preload' } ) -- Replace the link in outItems. outItems[i] = item .. ' ([' .. editUrl .. ' create])' end end end return table.concat( outItems, " &middot; " ) end

return { links = function( frame ) return links( frame ) end; }