title: Yii2 execute controller and show view from package in vendor
body: <p>In my case I am trying to execute <code>slide(controller)/index(action)</code> and render the corresponding view ( <code>index</code> ). They are both in my vendor folder like this way:</p>
  
  <pre><code>vendor/
     tomaivanovtomov/
        yii2-revolution/
           controllers/
           models/
           views/
              slide/
                 index.php
  </code></pre>
  
  <p>How should I construct my url to reach them ? Before this it was simply <code>www.example.com\backend\web\slide\index</code>. Now it gave me an expected error but I realized that I don't know how to reach them. Is there any way or I should override the controller at least in my <code>backend\controllers\</code> directory and the call it ? Thank you in advance! 
  <strong>EDIT</strong> Now I did it this way:</p>
  
  <pre><code> 1. Override the `SlideController.php` to my `backend\controllers\` directroy
   2. Extend the `vendor/tomaivanovtomov/revolution/controllers/SlideController.php`
   3. In action index set the layout to `$this-&gt;layout = '@vendor/tomaivanovtomov/yii2-revolution/views/slide/index';`
   4. And the return to `return $this-&gt;render('@vendor/tomaivanovtomov/yii2-revolution/views/slide/index', [
                      'dataProvider' =&gt; $dataProvider,
                      'hidden' =&gt; $hidden
                  ]);`
  </code></pre>
  
  <p>This is my <code>slide/index</code> action:</p>
  
  <pre><code>public function actionIndex()
      {
          $this-&gt;layout = '@vendor/tomaivanovtomov/yii2-revolution/views/slide/index';
  
          $searchModel = new SlideSearch();
          $dataProvider = $searchModel-&gt;search(Yii::$app-&gt;request-&gt;queryParams);
  
          $hidden = new Slide();
  
          return $this-&gt;render('@vendor/tomaivanovtomov/yii2-revolution/views/slide/index', [
              'dataProvider' =&gt; $dataProvider,
              'hidden' =&gt; $hidden
          ]);
      }
  </code></pre>
  
  <p>This way it properly renders the view but error <code>Undefined variable: hidden</code> occures. Any sugestions why is that ? Thank you!
  <strong>EDIT</strong>
  Index file:</p>
  
  <pre><code>&lt;?php
  
  use yii\widgets\ListView;
  use yii\widgets\ActiveForm;
  use yii\helpers\Html;
  use backend\components\BackendPrefix;
  
  \kartik\file\FileInputAsset::register($this);
  
  /* @var $this yii\web\View */
  /* @var $searchModel backend\models\SlideSearch */
  /* @var $dataProvider yii\data\ActiveDataProvider */
  
  $this-&gt;title = Yii::t('app', 'Slides');
  $this-&gt;params['breadcrumbs'][] = $this-&gt;title;
  ?&gt;
  
  &lt;div class="row"&gt;
  
      &lt;div class="col-sm-12"&gt;
          &lt;div class="form-group"&gt;
              &lt;button type="button" class="btn btn-primary" onclick="addSlideModel('&lt;?= BackendPrefix::PREFIX ?&gt;')"&gt;&lt;?= Yii::t('app', 'Add slide') ?&gt;&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;?php
  
          $form = ActiveForm::begin([
              'options' =&gt; [
                  'multipart/form-data'
              ],
              'action' =&gt;  [
                  'slide/create'
              ],
              'id' =&gt; 'slides'
          ]);
  
          //Hidden model to enable UploadFile class
          echo $form-&gt;field($hidden, 'image[]')-&gt;fileInput(['class' =&gt; 'display-n'])-&gt;label(false);
  
          echo ListView::widget([
              'dataProvider' =&gt; $dataProvider,
              'layout' =&gt; "{items}",
              'itemView' =&gt; function( $model, $key, $index, $widget ){
                  return $this-&gt;render("_slideImage", [
                      'model' =&gt; $model,
                      'index' =&gt; $index
                  ]);
              },
          ]);
  
      ?&gt;
  
      &lt;div class="col-sm-12"&gt;
          &lt;div class="form-group mt20"&gt;
              &lt;?= Html::submitButton(Yii::t('app', 'Save'), ['class' =&gt; 'btn btn-success']) ?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;?php
           ActiveForm::end();
      ?&gt;
  
  &lt;/div&gt;
  </code></pre>