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

Parameters to pass to the container view in responseReroute

Discussion in 'XenForo Development Discussions' started by infis, May 10, 2014.

  1. infis

    infis Well-Known Member

    Where and how I can use third parameter in responseReroute?

    For example, I use in actionIndex this as:
    return $this->responseReroute(__CLASS__, 'member', array('uid' => $uid));
    But in actionMember I can't use any parameters. And $this->_input->filterSingle('uid', XenForo_Input::UINT) not return this also.
  2. Chris D

    Chris D XenForo Developer Staff Member

    The third parameter sets the container params in the controller response. Container params will be available in the PAGE_CONTAINER template. You can also access them in _postDispatch, e.g.

    I don't think you can access them from the controller action directly. But you can in theory access them by listening to the controller_post_dispatch event.

    I think what you probably want to do is this:

    public function actionMember()
    $uid $this->_input->filterSingle('uid'XenForo_Input::UINT); // Contains the $uid param set in the request.
    infis likes this.
  3. infis

    infis Well-Known Member

    Thank you! This example is help me. Method setParam is solved my problem.
    Chris D likes this.

Share This Page