I can try that, but it should also work as I said isn't it?

On 29 Ott, 15:41, senser <[EMAIL PROTECTED]> wrote:
> Why don't you try to set some session variable with last inserted ID
> and in custom_page to read the details for this ID
>
> Paolo wrote:
> > Hi all!
> > I would like to modify the page cake shows after an item has been
> > added successfully. I 've done something like:
>
> > function add()
> >    {
> >            if (empty($this->params['data']))
> >            {
> >                    ....
> >                    $this->render();
> >            }
> >            else
> >            {
> >                    if ($this->Item->save($this->params['data']))
> >                    {
> >                                 $this->set('myVar','test');
> >                            $this->redirect('/pages/custom-page);
> >                            exit();
> >                    }
> >                    else
> >                    {
> >                            ....
> >                            $this->render('edit');
> >                    }
> >            }
> >    }
>
> > But in the custom-page I cannot accesmyVAr. I also tried to set 'data'
> > with params['data'], before and after the save, but it's always empty
> > (or better, it's never there). Do you know why this is happening? I
> > need this becaus in the custom page I want to add other things related
> > to the newly added item (i.e. I have an object that belongTo Item, so
> > after I added it I would like to add children to it.
>
> > Thanks
> > But in the custom-page I cannot


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