Hi,
I'm trying to create a custom route that matches the url used by a
previous system to a new version written in cake.
Basically I have urls that are domain.com/r/i/some-name and I'd like
to match them to the categories -> display action with two named
parameters id and url. Id maybe null as its not used by the older
system but will be in this version.
This works
Router::connect(
'/r/i/*',
array('controller' => 'categories', 'action' => 'display')
);
but doesn't give me named parameters. The following doesn't work.
Router::connect(
'/r/i/:url/:id',
array('controller' => 'categories', 'action' => 'display',
'id' => null),
array(
'id' => '[0-9]+',
'url' => '[a-zA-Z_-]'
)
);
Can someone explain what I am missing?
Thanks
Chris
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php