Some more details that might help: Inside your CitiesController you would have a view() action (a function) that you can pass the city id too.
Just in case you need to get really basic with how the MVC aspects work (broken into MVC): After requesting the url suggested by gwoo: /cities/view/1 C - the Controller: The action called view, in your CitiesController, requests that city's data from the model using something like find() M - the Model The City model searches the Cities database table for the record with the matching city id and returns the data to the Controller. (This is done automatically for you by calling find() or an equivalent in the controller. Once the model is initially set up, you won't need to add anything to make this process work.) The CityController then passes that to the view using set() V - the View The view called view.thtml then prepares the html served to the browser. --------- You also mentioned the homepage having a listing of all cities. That could also be in your CitiesController. You could have an action called ViewAll that uses findAll() to get all the cities. The controller would pass that data in an array to the view to display. Actually, I think you can really use the beauty of Cake here by just making a DB table for Cities, then using the bake feature to bake everything we just talked about including the model, views, controller and actions + adding, editing and deleting cities! You'll be amazed! Hope that helped and good luck! On May 4, 1:15 pm, gwoo <[EMAIL PROTECTED]> wrote: > You would create a CitiesController with a City model. > Your URL would be /cities/view/1 for the city with id 1. > You could use this to set a Session that would allow the current city > to persist across other controllers. > > hope this helps. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
