[eluser]meigwilym[/eluser]
Here's a quick example using a simple app that I'm currently building.
I've got two global views header.php and main.php.
Each file has <?php echo $content; ?>.
header.php is the html for the <head> and main.php has everything else.
I then have more views, with 2 or 4 columns, which I can use as I want.
In the controller I have
Code:
// load some JS first...
$head['content'] = $this->load->view('jquery', '', TRUE);
// then get the html...
$html = $this->yourmodel->get();
$data['content'] = $this->load->view('two-col', $html, TRUE);
$this->load->view('_global/header', $head);
$this->load->view('_global/main', $data);