[eluser]Michael Wales[/eluser]
Your header, footer, etc. should all be views. HTML goes in views. Your controller will then call all of these views in the correct order or a master layout view that then calls these views (my preferred method - explain in code below).
controllers/posts.php
Code:
function index() {
// Load a few posts from our blog
$data['posts'] = $this->post->get_recent(10);
// Our partial view to load
$data['partial'] = 'posts/index';
// Load our master view file
$this->load->view('layout', $data);
}
views/layout.php
Code:
<?php
$this->load->view('header');
$this->load->view($partial);
$this->load->view('footer');