Wednesday, April 29, 2009

Router situation

Can i make a routes with connectNamed and have different routes pointing
at the same controller/action but with different through the value of
the named
i tried something like this:

Router::connectNamed(array('type'), array('default' => true));

Router::connect('/pens/:action/*', array('controller' => 'products'),
array('type' => 0));
Router::connect('/pencils/:action/*', array('controller' =>
'products'), array('type' => 1));

Thing is it's not working. What i get is having only the first rule
validated and both url's point to the /pens/index/type:0, or
/pens/index/type:1 in second case

Any idea ?
Thx

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: