Header and footer in CodeIgniter
Asked 07 September, 2021
Viewed 1.8K times
  • 64
Votes

I really don't enjoy writing in every controller:

    $this->load->view('templates/header');
    $this->load->view('body');
    $this->load->view('templates/footer');

Is it possible to do, that header and footer would be included automatically and if we need to change it, we could also do that? How do you deal with that? Or it's not a problem in your opinion? Thanks.

14 Answer