title: How to render a page in zend framework 2?
body: <p>I used below code to render a page in the controller action.</p>
  
  <pre><code>public function userinforeceiveAction()
  {   
      $renderer = new PhpRenderer();
  
      $map = new Resolver\TemplateMapResolver(array(
      'userinfo' =&gt; __DIR__ . '/userinfo.phtml',
          ));
  
          $resolver = new Resolver\TemplateMapResolver($map);
          $renderer-&gt;setResolver($resolver);
          $model = new ViewModel();
          $model-&gt;setTemplate('userinfo');
  
          return new ViewModel();    
  }
  </code></pre>
  
  <p>and I echo rendering content in the view.</p>
  
  <pre><code>echo $renderer-&gt;render($model);
  </code></pre>
  
  <p>but it render nothing. Please help me. thanks.
  and also its fine work with zf1 by this two lines.</p>
  
  <pre><code>$this-&gt;userinfoAction();
  $this-&gt;$render('userinfo');
  </code></pre>