Yep, that was a mistype. I meant to say, if I had two different
actions with the Post controller (one action for editing a post, and
one for creating a new post), then cake would expect to have two views
with these two actions. And I'm trying to avoid having to maintain
two different, almost duplicate views (they both show the same exact
form).
But I'll just use render(). Thanks.
On Jul 16, 11:30 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 17, 6:27 am, beetlecube <[EMAIL PROTECTED]> wrote:
>
> > ... editpost and newpost pages.
>
> > I'm creating a mini-discussion forum, and not sure whether or not to
> > have the "new post" and "edit post" pages just simply combined.
> > But I don't want the URL bar to say "edit" if someone is creating a
> > new post. (The other aspects of how to do it this way are of course
> > easy: just have a single edit controller to save() without an id, or
> > save() with an id)
>
> Why would you have an edit controller, is that a mis-type? You should
> have an edit method in your Post (for example) controller. You can
> pass render the name of the view file to show, i.e. in your add
> function $this->render('edit');
>
> hth,
>
> AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---