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