Exactly like you would an ID. You just except a string instead of an
integer, when writing the regex. Even then you can do it with basic
routing.
// Link
$html->link('Title', array('controller' => 'posts', 'action' =>
'view', $slug));
// Action
function view($slug) { }
On Jan 14, 10:53 pm, Robin Thomas <[email protected]> wrote:
> Hi..
>
> I am new to cake php. Here is my task.
>
> Present URL :
>
> www.example.com/post/view/1 { where '1' is the Id of the post. }
>
> I want to use a column other than Id(a column called URL) to be
> passed for SEO.
>
> www.example.com/post/view/my-first-post {where my-first-post is
> the value of the URL column in my table }
>
> How can I map this ?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en