XF 2.0 Can I take any variables with me in "return $this->redirect($this->buildLink"


Active member
What I am trying to do is display a success or failure popup box which will be set on a variable under this action. Is there a way I can take a a variable with me to the page I am redirected too? I would prefer to not have to use get, so that it doesn't create a permanent link to a success or failed message. I also would like to note have to do a double redirect.


XenForo developer
Staff member
I assume you're referring to doing something in JS with those values, in which case you can set additional parameters which will be in the JSON output. As an example (from thread quick closing):
$reply = $this->redirect($this->getDynamicRedirect());
   'text' => $text,
   'discussion_open' => $thread->discussion_open