I want to create common header and footer that are included on several view pages in MVC.
I'd like to use codeigniter for my project. Most people suggested me to use require_once php function in ci. But, how should I do?
Can Some one give a Step By Step Procedure to include require once in a view file. Through Controller, we can use like the following:-
public function home(){
$this->load->view('templates/header');
$this->load->view('about');
$this->load->view('templates/footer');
}
public function about(){
$this->load->view('templates/header');
$this->load->view('index');
$this->load->view('templates/footer');
}
How can we do it in view pages in ci using require_once..?