Hi,
My site allows users to create a new wiki page via an ajax popup box.
They choose a
title and select a parent for the new wiki page and then click submit.
Currently the redirect takes the user to their home wiki page
because I
have no way of redirecting them to the newly created page. Here is
how
the redirect works now:
echo($ajax-submit('Create',
array('complete'='window.location = "' .
$html-url($redirect_url) . '";')
)
);
That $redirect_url gets set before the users submits the data to
create
the new page. I would like to somehow pass the newly created wiki
page
id back to the view so that it can be redirected similar to above
or do
something like the following:
// Save the new page data
$this-WikiPage-save($this-data, false);
$newWikiPageId = $this-WikiPage-getLastInsertId();
$this-redirect('/controller/action/' . $newWikiPageId);
The code above does not work because of the headers already being
passed or something???
Does anyone have a clue as to how I could get this to work?
Thank you
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---