1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can you pass parameters through XenForo_ControllerResponse_Redirect?

Discussion in 'XenForo Development Discussions' started by Jaxel, Feb 5, 2011.

  1. Jaxel

    Jaxel Well-Known Member

    Okay... lets say I am doing the following:
    Code:
    return $this->responseRedirect(
    	XenForo_ControllerResponse_Redirect::SUCCESS,
    	XenForo_Link::buildPublicLink('media', $media)
    );
    In addition to sending the user to the new page, I also want to send the user a string parameter. For instance, if I am redirecting a user to a media page, I want to also tell them why I am sending them to the media page. As well, can I do this from a DataWriter? In my DW I am checking to see if a media is unique; if its not unique I don't want to print out a general error. Instead I want to redirect them to the existing video and send the general error through a parameter.
     
  2. Shadab

    Shadab Well-Known Member

    3rd parameter to responseRedirect() would be the message (string) you want to show.

    If your html form is classed as "AutoValidator", the message would be shown as a slide-down for a few seconds before the user is redirected to the target url, automatically.
     

Share This Page