Maybe :
$this->redirect('/questions/index'); instead of
$this->render('questions/index.thtml'); gives better results ? You
can render another view, with same controller, for another controller
using redirect is better (also in cake 1.1 add an "exit()" after the
redirect). I am not sure about the controllers you have got, but if in
view/surveys you have got the index just render 'index'.
hth
On Jan 6, 11:23 pm, chrisdNH <[EMAIL PROTECTED]> wrote:
> Thanks but have a slight problem :-)
>
> My save function is:
>
> class SurveysController extends AppController
> {
>
> function save()
> {
> if (empty($this->data))
> {
> $this->render();
> }
> else
> {
> if($this->Survey->save($this->data))
> {
> $this->flash('Thank you for completing the
> survey.','/questions');
> }
> else
> {
> // Validation errors.
> $this->set('errorMessage', 'Please correct errors below.');
> $this->render('questions/index.thtml');
> }
> }
>
> }
>
> The last render, $this->render('questions/index.thtml'), returns the
> error,
> "Fatal: Confirm you have created the file : ...views/surveys/questions/
> index.thtml.thtml"
>
> Obviously, I have the syntax of render() incorrect. Any insight? :-)
>
> Thanks, -Chris
>
> On Jan 6, 3:14 pm, Robby Anderson <[EMAIL PROTECTED]> wrote:
>
> > Check out the controller->render() method.
>
> >http://api.cakephp.org/1.2/class_controller.html#90046e6b62c91452a987...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---