In CodeIgniter, or core PHP; is there an equivalent of Rails\'s view partials and templates?
A partial would let me render another view fragment inside my view. I co
In PHP you'd use include
My recently released Template library works in this way.
That template library also plays nicely with my Dwoo implementation which will give your views much more power.
Symfony does this with their partial/component setup.
Try out Ocular - http://codeigniter.com/wiki/Ocular_Layout_Library/ - its a rails inspired templating library.
This is unfortunately not CodeIgniter specific at all, however I suggest you to have a look at Savant3 template system. It allows you to render the template to a string. Then you can simply stuck it to wherever you wish.
Maybe there's something like that in CodeIgniter?
I can think of a way to add a facility when rendering the view, to render the template, and then all the sub-template it contains.
I may be breaking some MVC rule, but I've always just placed my "fragments" in individual views and load them, CodeIgniter style, from within the other views that need them. Pretty much all of my views load a header and footer view at the top and bottom, respectively:
<? $this->load->view( "header" ); ?>
//Page content...
<? $this->load->view( "footer" ); ?>
The header could then include a NavBar in the same fashion, etc.