After some more searching around I came up with the following:
Router::connect('/', array('controller' => 'contents', 'action' => 'view'));
Router::connect('/:slug', array('controller' => 'contents', 'action' => 'view', array('routeClass' => 'SlugRoute')));
It seems to be working for my requirements however I wanted to see if this was the best way to do it or should it be done differently?
Thankyou
--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Friday, July 20, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment