title: Yii2 render frontend view from backend controller
body: <p>My task is simple. I have to render frontend view from backend controller. What i've done so far is to create <code>urlManagerFrontendView</code> path in my <code>main.php</code>:</p>
  
  <pre><code>'urlManagerFrontendView' =&gt; [
      'class' =&gt; 'yii\web\urlManager',
      'baseUrl' =&gt; $_SERVER['DOCUMENT_ROOT'] . '/frontend/view/',
      'enablePrettyUrl' =&gt; true,
      'showScriptName' =&gt; false,
  ],
  </code></pre>
  
  <p>This is how i am trying to render it(from the backend):</p>
  
  <pre><code>return $this-&gt;render(''.Yii::$app-&gt;urlManagerFrontendView-&gt;baseUrl.'page/product', [
              'model' =&gt; $product,
              'product_rel' =&gt; $product_rel,
              'thispage' =&gt; $thispage,
          ]);
  </code></pre>
  
  <p>But what i get is an error:</p>
  
  <pre><code>The view file does not exist: /home/projects/tashev-online/htdocs/backend/views/home/projects/tashev-online/htdocs/frontend/viewpage/product.php
  </code></pre>
  
  <p>Obviously i didn't create it right :) So can you guys help my with my path? What is the right way to reach the frontend? Thank you in advance!</p>