To put it simply, there is magic happening that you don't see. If you don't call it yourself in the Controller method, $this->render() is called for you. Other magic finds the correct view name to use based on the action name (though you can override this to specify an alternate) and which layout to use (unless you override).
Wayne On 10/19/07, jakeone <[EMAIL PROTECTED]> wrote: > > I'm confused. Why do URLs in Cake typically point to "controller/ > action" and not "view/action"? I would have thought a link was > presenting something to the user, i.e. a view, not an action. > > The Cake manual's blog tutorial has a link as follows: > > echo $html->link('Add Post', '/posts/add'); > > and when you look at the Post controller's add action you see: > > function add() > { > if (!empty($this->data)) > { > if ("this->Post->save(%this->data)) > { > $this->flash('Your post has been saved.', '/posts'); > } > } > } > > I don't see how that displays the Add Post form (i.e. view) to the > user... Or am I missing the point? > > Thanks. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---