Thursday, November 26, 2009

Re: Render problem

Thanks.

On Nov 27, 6:29 am, John Andersen <j.andersen...@gmail.com> wrote:
> The API for the Controller class, render method, at:
>
> http://api.cakephp.org/class/controller#method-Controllerrender
>
> do states that:
>
> return
>     string Full output string of view contents
>
> So it is correct that you should echo the returned output!
>
> Enjoy,
>    John
>
> On Nov 26, 9:28 pm, jburns <jeremybu...@me.com> wrote:
>
>
>
> > I have been struggling to get a render command to work:
>
> > $this->render('xxx');
>
> > ...where xxx is the name and path of a view. The view exists and is
> > being reached by the command (tested by misspelling xxx in the
> > command. I have also placed debug statements either side of the render
> > to test that that line of code is running.
>
> > The view is very simple, containing either echoes or straightforward
> > html, yet the render command is not issuing any output. To get it to
> > work I had to use:
>
> > echo $this->render('xxx');
>
> > ...which is not specified in the online docs.
>
> > So whilst I have solved my problem, I am intrigued. Can anyone shed
> > any light on this please?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: