I'm not sure exactly what your problem is but I'm guessing from your wording that you are seeing the view belonging to the sending action not the receiving action?
Say your sending action is PostsController::firstAction()
, then you'd expect to see views/posts/first.volt
. After the forwarding to PostsController::getByUserAction($userId,$page)
you'd expect to see views/posts/getbyuser.volt
, but you still see views/posts/first.volt
?
If I'm understanding you correctly you need to pick the new view: $this->view->pick("posts/getbyuser")
i.e.:
$this->view->pick(...);
$this->dispatcher->forward(...);