title: Phalcon PhP - how to change the view dynamically
body: <p>I'm working in a website where part of it I have the static html, so I created a layout and in it I'm inserting the static content using views. My problem is as this website has many pages I feel wrong creating an action for each url. So I implemented the controller below:</p>
  
  <pre><code>class PageController extends ControllerBase
  {
      public function initialize(){
          $this-&gt;init();
          $this-&gt;view-&gt;setLayout( 'website' );
      }
  
      public function indexAction ($url=''){
          if($url == 'about')
              $this-&gt;view-&gt;pick('page/about');
      }
  }
  </code></pre>
  
  <p>When I set the controller view to render $this->view->pick('page/about'); it doesn't insert the view in the template. It renders only the view.</p>
  
  <p>Is there a way to render the view within the layout, and is there a better approach to what I'm doing?</p>
  
  <p>Thanks for any help</p>