[eluser]kirkaracha[/eluser]
I'm working on an application that lists places, primarily US cities with a few international locations.
I'd like the URLs to work like this:
/places/ <- intro text and search form
/places/ohio/ <- list of cities in Ohio
/places/ohio/cincinnati/ <- place info for Cincinnati
/places/england/<- list of cities in England
/places/england/london/ <- place info for London
/places/add/ <- form for adding places
/places/edit/1/ <- form for editing places
/places/delete/1/ <- form for deleting places
What's the best way to set this up?
I've started with routes but I'm having trouble figuring out how to handle having the second URL segment.
Could set up routes for add/edit/delete, then remap everything else though the index function?