You should place them in a central controller or else you will get bit later ... Ie: example.com/cars/bmw example.com/cars/toyota example.com/cars/nissan In your routes.php: $Route->connect('/cars/*', array('controller' => 'Car', 'action' => 'view')); In your car controller: function view($car = '') { if ($car) { $cars = $this->Car->findAllByCar($car); // (dynamic) available in 1.2 } else { $cars = $this->Car->findAll(); } $this->set('cars',$cars); $this->render('view'); } If you *need* to have those URLs instead you can just move the Route up one level. - Jon On Nov 1, 2006, at 6:27 AM, Marcin Szkudlarek wrote: I would like to map multiple url to one controller method like this: |
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
