<?php
//$object is the oject of my controller
class Front {
public function __construct() {
//Do what you want
}
public function footer($object) {
$object->load->view('template/footer',$object->data);
}
public function header($object) {
$object->data['header'] = 'My header';
$object->load->view('template/header',$object->data);
}
public function page($object) {
//Example: you can load everything with $object
$object->load->helper('url_helper');
$this->header($object);
$this->footer($object);
}
}