Hi guys, I'm going through the Apress book "beginning zend framework", and now i'm stuck lol
i have various actions for an artist controller, one of which is:
http://localhost/artist/new (adds new artist)
the book then explains how to enable routing:
http://localhost/artist/thebeatles (actually goes to artist/profile action)
Here's the routing code:
/** Routing Info **/
$FrontController = Zend_Controller_Front::getInstance();
$Router = $FrontController->getRouter();
$Router->addRoute("artistprofile", new Zend_Controller_Router_Route(
"artist/:artistname", array
("artistname" => "The Smiths",
"controller" => "artist",
"action" => "profile" )
));
However, since enabling this routing, even artist/new gets routed to artist/profile! Surely it only routes if the action doesn't exist!
The book doesn't even recognise that theres a problem, but then the book is for v1.8, and i have v1.10