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 and item ~= '' then outItems[#outItems + 1] =  .. 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[#outItems + 1] = item .. ' ([' .. editUrl .. ' create])' end end end end return table.concat( outItems, " &middot; " ) end

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