Great, thanks a lot Geoff Thanks for the info on your solid blog as well. On Jul 17, 10:15 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > The way I usually do this is i only have an edit function. If there > is an $id parameter then I will set $this->data which will fill the > form, otherwise the form will be empty, thus allowing a new entry > > Geoff > --http://lemoncake.wordpress.com > > On Jul 18, 12:58 pm, beetlecube <[EMAIL PROTECTED]> wrote: > > > In the official Cakephp blog tutorial, as we know it obvoiusly takes > > you through creating a blog, i.e. a way of adding new posts or > > editing posts. > > > There is an add.thtml and an edit.thml page. > > > The add.thtml form action link is: $html->url('/posts/add') > > The edit.thtml form action link is: $html->url('/posts/edit') > > > Besides these two difference, they are both virtually the same file. > > > Would it be a good idea to put the Form data into a single element > > file, and then in edit.thtml and add.thtml, you use > > renderElement( ...., array("action" => '/posts/add') , or of course > > array("action_url" => '/posts/edit') for the edit view ? > > > Then in the element thtml file , it would be $html->url($action_url) > > > I realize that the blog tutorial was meant to provide the beginner > > with the basics and didn't want to introduce elements yet, but figured > > I'd ask this.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
