local p = --Package to be exported
function p.url1(frame) --This function builds URLs. local pframe = frame:getParent --get arguments passed to the template local args = pframe.args local parish = args['parish'] or --this string holds the raw parish name local parishProcessed --this string holds the processed parish name to be added to the URL --Various parishes need special treatment to handle spaces and/or punctuation. if parish
"East Baton Rouge" then parishProcessed = "East_Baton_Rouge" elseif parish
"East Feliciana" then parishProcessed = "East_Feliciana" elseif parish
"La Salle" then parishProcessed = "LaSalle" elseif parish
"Red River" then parishProcessed = "Red_River" elseif parish
"St. Charles" then parishProcessed = "St_Charles" elseif parish
"St. James" then parishProcessed = "St_James" elseif parish
"St. Landry" then parishProcessed = "St_Landry" elseif parish
"St. Mary" then parishProcessed = "St_Mary" elseif parish
"West Baton Rouge" then parishProcessed = "West_Baton_Rouge" elseif parish
"West Feliciana" then parishProcessed = "West_Feliciana" else parishProcessed = parish end return parishProcessed end
function p.url2(frame) --This function builds URLs. local pframe = frame:getParent --get arguments passed to the template local args = pframe.args local parish = args['parish'] or --this string holds the raw parish name local parishProcessed --this string holds the processed parish name to be added to the URL --Various parishes need special treatment to handle spaces and/or punctuation. if parish
"East Baton Rouge" then parishProcessed = "EastBatonRouge" elseif parish
"East Feliciana" then parishProcessed = "EastFeliciana" elseif parish
"La Salle" then parishProcessed = "LaSalle" elseif parish
"Red River" then parishProcessed = "RedRiver" elseif parish
"St. Charles" then parishProcessed = "StCharles" elseif parish
"St. James" then parishProcessed = "StJames" elseif parish
"St. Landry" then parishProcessed = "StLandry" elseif parish
"St. Mary" then parishProcessed = "StMary" elseif parish
"West Baton Rouge" then parishProcessed = "WestBatonRouge" elseif parish
"West Feliciana" then parishProcessed = "WestFeliciana" else parishProcessed = parish end return parishProcessed end
return p