Thursday, November 26, 2009

Render problem

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: