localp={}localinsert=table.insertfunctionp.url(frame)localpframe=frame:getParent()localconfig=frame.args-- the arguments passed BY the template, in the wikitext of the template itselflocalargs=pframe.args-- the arguments passed TO the template, in the wikitext that transcludes the templatelocaltype=args[1]localroute=tonumber(args[2])localsuffix=args[3]or''localurl={"https://www.dot.state.tx.us/tpp/hwy/",type}iftype=="FM"thenifroute<500theninsert(url,'')elseifroute<1000theninsert(url,"0500")elseifroute<1500theninsert(url,"1000")elseifroute<2000theninsert(url,"1500")elseifroute<2500theninsert(url,"2000")elseifroute<3000theninsert(url,"2500")elseifroute<3500theninsert(url,"3000")elseifroute>=3500theninsert(url,"3500")endendinsert(url,"/")insert(url,type)insert(url,string.format("%04d",route))insert(url,suffix)insert(url,".htm")returntable.concat(url)endreturnp