[eluser]juan1904[/eluser]
Alright I'll explain a little further.
My solution to partial views is that I've created a post_controller where I load the views.
post_controller.php:
Code:
function post_controller()
{
$CI =& get_instance();
// Some data here between which is nessecary but not relevant for this question.
$CI->load->view('partial/template', $data);
}
my main controller:
Code:
class Main extends Controller {
function __construct()
{
parent::Controller();
}
function index()
{
$data['content'] = 'main';
$this->load->vars($data);
}
}
Because I am such a lazy person I don't want to write $this->load->vars($data) in every singel controller. So I thought there might be a function which is run after the function which is called by the view, so that I can write $this->load->vars($data) in that one instead.