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 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to