For anyone who's interested the answer can be found here: http://stackoverflow.com/questions/5715481/how-can-i-make-a-slug-using-fields-from-a-different-table-using-sluggable-behavio
On Apr 19, 12:40 am, Sam Sherlock <[email protected]> wrote: > using slugs (cakedc utils plugin sluggable or cake syrup) > > http://bakery.cakephp.org/articles/mariano/2007/03/24/sluggable-behavior > > and in routes > > App::import('Lib', 'routes/UserRoute'); > Router::connect('/:slug', array( > 'controller' => 'users', > 'action' => 'view'), > array('routeClass' => 'UserRoute')); > > you could specify the form the slug must be there too > > see the section Passing parameters to action in the cake > bookhttp://book.cakephp.org/view/945/Routes-Configuration#Passing-paramet... > > adapt the advice on Mark Story routing > classhttp://mark-story.com/posts/view/using-custom-route-classes-in-cakephp > > hth - S > > On 19 April 2011 00:02, MeatSandwich <[email protected]> wrote: > > > > > > > > > I'm trying to create an app which allows a user to create an account > > and then create their own page. > > > I'd like to use a combination of the users first and and last name as > > the url of their page, ie mywebsite.com/john_smith > > > Obviously I'd need to create a controller with an apropriate action, > > but how do I go about making it have the url I want? > > > By the way, I've read through the manual a bunch of times (all the > > stuff about routes esp) and read loads of tutorials and a couple of > > the books but there's nothing I've come across that explains this > > exactly. > > > any help would be greatly appreciated. > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- 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
