title: CodeIgniter or PHP Equivalent of Rails Partials and Templates
body: <p>In CodeIgniter, or core PHP; is there an equivalent of Rails's view partials and templates?</p>
  
  <p>A partial would let me render another view fragment inside my view. I could have a common <code>navbar.php</code> view that I could point to the inside my <code>homepage.php</code> view. Templates would define the overall shell of an HTML page in one place, and let each view just fill in the body.</p>
  
  <p>The closest thing I could find in the CodeIgniter documentation was <a href="http://codeigniter.com/user_guide/general/views.html" rel="nofollow noreferrer">Loading multiple views</a>, where several views are rendered sequentially in the controller. It seems strange to be dictating the visual look of my page inside the controller. (i.e. to move the navbar my designer would have to edit the controller).</p>
  
  <p>I've been searching on stack<strong>overflow</strong> for a PHP way to accomplish this. I have found <a href="https://stackoverflow.com/questions/761922/can-you-render-a-php-file-into-a-variable">this page</a>, which talks about simulating partials with <a href="http://us3.php.net/ob_start" rel="nofollow noreferrer">ob_start</a>. Is that the recommended approach inside CodeIgniter?</p>