My problem here was that I wanted to call a view, which depended on a
variable. As the redirect was clearing the variable, the display of
the view failed. I solved by (i) calling the view function [including
the $id of the record I wanted to view] and (ii) rendering the view.
By calling the functio
Thanks for the tip. That isn't in the docs (although it is in the
API). Regrettably, that doesn't work either - it is clearing the
variables. However, I solved this issue now (very simply and
elegantly) and am in the process of writing up my solution, which I'll
post back here).
On Dec 4, 5:49 pm,
Well of course, its another HTTP request and a complete new page load.
If you want to redirect it to another action, use setAction().
On Dec 4, 7:24 am, euromark wrote:
> of course it does
>
> variables in a script are always for that "session" only
> a redirect even to the same url starts the wh
of course it does
variables in a script are always for that "session" only
a redirect even to the same url starts the whole process again
use session, file cache, or pass them with your redirect url
(depending on the kind of information and how much it is)
On 4 Dez., 13:59, Jeremy Burns wrote:
I am setting a variable using $this->set('name', value), and then
redirecting the user to a different page using $this->redirect(array
('action' => 'index'), null, true);. The variable $name is no longer
recognised. Does a redirect clear the set variables? If so, how can I
pass the variable along t