Hi,
I have setup a custom route/page, which works fine. In the page I have a form which later runs actionCustom upon submit (it does this and redirects successfully). However, I would like to be able to use the redirectParams (in this case: $test variable) in the actionCustomList.
I would appreciate any help on how I can use the redirectParams.
Many thanks in-advance!
I have setup a custom route/page, which works fine. In the page I have a form which later runs actionCustom upon submit (it does this and redirects successfully). However, I would like to be able to use the redirectParams (in this case: $test variable) in the actionCustomList.
Code:
public function actionIndex()
{
$hello = 'hello';
$viewParams = array('hello' => $hello);
return $this->responseView('MyCustomFolder_MyAddonName_ViewPublic_MyFileName', 'mycustomfolder_myaddonname_index',$viewParams);
}
public function actionCustom(){
$test = 'goodbye';
return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,
XenForo_Link::buildPublicLink('mycustomroute/custom/list',$test),
new XenForo_Phrase('Done!')
);
}
public function actionCustomList()
{
// actionCustom will redirect to this action, how can I use the $test variable here??
// currently it returns $test is an undefined variable.
$viewParams = array('test' => $test);
return $this->responseView('MyCustomFolder_MyAddonName_ViewPublic_MyFileName', 'mycustomfolder_myaddonname_index_list',$viewParams);
}
I would appreciate any help on how I can use the redirectParams.
Many thanks in-advance!