[eluser]darkhouse[/eluser]
There are a couple solutions. You could use a template system, Colin Williams wrote one that seems to be pretty popular, though I have not tried it. [url="http://williamsconcepts.com/ci/codeigniter/libraries/template/"]http://williamsconcepts.com/ci/codeigniter/libraries/template/[/url]
Or, you could do what I do and just setup your controller like this:
Code:
$data['content'] = $content_array;
$data['navigation'] = $navigation_array;
$this->load->view('content', $data);
And then setup your view like this:
Code:
<?php $this->load->view('header'); ?>
some html here
<?php print_r($content); ?>
more html
<?php $this->load->view('navigation', $navigation);
final html, or whatever your structure is
<?php $this->load->view('footer'); ?>
That's generally what I do, just do all the common view loading from within the main view, so I only have one view being loaded in my controller. But check out that template library, it might be a better solution now and for future projects.