This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.
localp={}localtypes=mw.loadData("Module:Road data/RJL types")localfunctionparameterParser(args)localkeysParam=args.keysifnot(keysParam)thenreturn{}endlocalkeys=mw.text.split(keysParam,",")table.sort(keys)returnkeysendlocalfunctioncreateLegend(key,html_object)locallistargs={class='routelist-bottom-legend'}for_,vinipairs(key)dolocaltype=types[v]iftypethentable.insert(listargs,'<span style="background-color: '..type.color..'"> </span> '..type.routelist)endendhtml_object:wikitext(require('Module:List').horizontal(listargs))endfunctionp._bottom(args)localroot=mw.html.create('tr'):addClass('sortbottom')row=root:tag('td')row:attr('colspan','9'):addClass('routelist-bottom')-- we would prefer to add the TemplateStyles before the class is declared-- but that's not really feasible in this particular table context:wikitext(mw.getCurrentFrame():extensionTag{name='templatestyles',args={src='Module:Routelist bottom/styles.css'}})localconversionif(args.convor'no')=='yes'thenconversion="1.000 mi = 1.609 km; 1.000 km = 0.621 mi<br>"endrow:wikitext(conversion)localkey=parameterParser(args)ifkey[1]thencreateLegend(key,row)endif#row.nodes==0thenreturn'|-\n|}'elsereturntostring(root)..'\n|-\n|}'endendfunctionp.bottom(frame)returnp._bottom(require('Module:Arguments').getArgs(frame))endreturnp