Thursday, May 5, 2011

Re: cakephp route,

On May 4, 2011, at 21:14, sindhu.13 wrote:

> I want to view my news in view.ctp base on "title" not "id",
> so if by id -> "newsses/view/3" if id is 3
> but i want make like -> "newsses/view/news_title" if title is "News
> Title"
>
> so how do i make it.?.
> route, controller and view action

So you want to have URLs based on slugs instead of ids. Read about sluggable behavior:

http://bakery.cakephp.org/articles/mariano/2007/03/24/sluggable-behavior

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

No comments: