thanks for your replies. I will probably just go with the simple
render option as this seems ridiculously easy to do! What would be
the benefit of using the (slightly) more complicated elements option?
I am also trying to figure out how to modify multiple records with a
single form. I see that there has been a ticket open and closed on
this topic which requires patching of some of the config files. Is
this still the only way of achieving this?
On Apr 16, 8:05 pm, TechSteve <[EMAIL PROTECTED]> wrote:
> vote for this way.
>
> Femi Taiwo's method is perfect, but for simple use, if you just have
> these two actions to be rendered in the same view, easier way will be
> better in my mind.
>
> On Apr 16, 2:19 am, grigri <[EMAIL PROTECTED]> wrote:
>
> > function viewx() {
> > $this->set('students', ...);
> > $this->render('viewall');
>
> > }
>
> > On Apr 16, 6:52 am, damo <[EMAIL PROTECTED]> wrote:
>
> > > Can't seem to figure this one out.
>
> > > I have two controllers that I would like to use the same view for.
> > > Here is how they are:
>
> > > function viewall()
> > > {
> > > $this->set('students', $this->Student->findAll(array(
> > > 'Student.status' => "Active" )));
>
> > > }
>
> > > function viewx()
> > > {
> > > $this->set('students', $this->Student->findAll(array(
> > > 'Student.status' => "Active",
>
> > > 'Student.state' != "X")));
> > > }
>
> > > What do I have to add to the 'viewx' to get it to render in the same
> > > view as the viewall?
>
> > > Many thanks
> > > Damo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---