Module:Lists

local _list = {}

function _list.generate911List ( frame ) local html = mw.html.create ( 'ul' ) local args = frame:getParent.args for i, message in ipairs(frame:getParent.args) do		if message then html = html :tag ( 'li' ) :css ({						['margin-top'] = '12px'					}) :wikitext (						frame:expandTemplate {							title="911",							args={								['type'] = args['type_' .. i] or args['type'] or "",								['name'] = args['name'] or frame:callParserFunction( "PAGETITLE:" ),								['phone'] = args['phone_' .. i] or args['phone'] or "",								['id'] = args['id_' .. i] or args['id'] or "",								['message'] = message or ""							} 						}					) :done end end return html:allDone end

function _list.generateQuoteList ( frame ) local args = frame:getParent.args local columns = args['columns'] or '1' local html = mw.html.create ( 'div' ) :css({			['width'] = args['width'] or "100%",			['overflow-x'] = 'auto',			['font-style'] = "italic"		}) :tag ( 'ul' ) :css ({				['columns'] = columns,				['-webkit-columns'] = columns,				['-moz-columns'] = columns,				['column-gap'] = args['gap'] or '40px'			}) for _, v in ipairs(frame:getParent.args) do		local quote = mw.text.trim(v) if quote then html = html :tag ( 'li' ) :css ({						['page-break-inside'] = 'avoid'					}) :tag( 'p' ) :wikitext ( '“' .. quote .. '”' ) :done :done end end return html:allDone end

function _list.generatePageLinkList( frame ) --Get parameters passed into the calling template local templateArgs = frame:getParent.args local concatTable = {} --{{{namespace|{{{n|{{{ns|{{{1 --Limit to 100 because we need to treat the nice wiki well and not lag it :)	local i = frame.args[1] and 2 or 1	while i < 101 do		if templateArgs[i] then			table.insert( concatTable, "*" .. frame.args[1] .. ":" .. templateArgs[i]				.. " \n" )		else			mw.text.trim(concatTable[#concatTable])			break		end		i = i+1	end	return table.concat(concatTable) end

return _list