Your function does not have to accept an id; it can easily accept another value 
like username or slug. Look at how the url is being formed in the view and 
replace id with username. Then change you controller function to accept 
username, and change the find statement.

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 19 May 2011, at 06:27, Prakhar Alok wrote:

> Hi,
> 
> I have just started using cakephp. I was going through the tutorials
> for building a blog and using auth component.
> Lets say that I have added some users for the blog. Now I want to view
> any user. For this I have baked the Users model. The URL will be
> something like /users/view/1 (say its is is 1). What if I want the URL
> to be transformed to the name of the user like /users/prakhar. Just
> like when viewing any Facebook profile, for ex. mine is facebook.com/
> prakhar.alok.
> 
> Help required.
> 
> regards,
> Prakhar
> 
> -- 
> 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

-- 
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

Reply via email to