Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to set parameter to other view in my controller?



67.7k
Accepted
answer
edited Oct '15
$this->view->setVars([
            'type' => $type,
            'form' => new \Forms\Myformr(null, $data),
            'id' => $model->id
        ]);

inside the view


echo $this->view->type;

?

edited Oct '15

inside the view for phtml:

echo $type

volt:

{{ type }}