Yes, but the problem is that if i call $data['Post']['title], if the title contains spaces (i.e. "Hello First Post") i'll have a broken link like "http://www/posts/12/Hello First Post". I can add another attribute to the Posts table, "url_title" for example, and then, when i add a Post, fill it with the title with white spaces string replaced to '-'.
I was looking for a clean solution to string replace the white spaces, directly from $html-link() call. Thank you! On Jul 22, 10:16 am, Grzegorz Pawlik <[EMAIL PROTECTED]> wrote: > just call $html->link('/posts/view/'.$data['Post']['id'].'/'. > $data['Post']['title']); > > if your view action have only one parameter $id, if it has more. f.e. > function view($id, $some_param=null, $some_param2=null); > then call it that way: > $html->link('/posts/view/'.$data['Post']['id'].'///'.$data['Post'] > ['title']); > and so. > Hope that's what You were looking for > > On Jul 21, 7:47 pm, Laburno <[EMAIL PROTECTED]> wrote: > > > About the Blog tutorial, how can i call the view action from a url > > like this?http://example.com/posts/view/id/my-post-title/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---