Views and CodeIgniter

    Some time ago, I decided to slowly switch to some framework. At first, my eyes fell on symfony, but then I switched to CodeIgniter.


    The MVC model was new to me. Climbing over the Internet, I managed to find examples where the model is bypassed, which is sad. Next, a question arose with the design of the template.

    It’s more common for me to make a template of the form: In CodeIgniter, as far as I understand, it is difficult to implement one template for everything and transfer data there. But rummaging through the network, I managed to find the solution that Alexander Makarov proposed. Or use this method: Which one to choose? How acceptable is the method proposed by Alexander Makarov? How is this organized in your place?

    include("_header.php");
    ..........
    include("_footer.php");
    ?>





    $data['header']=$this->load->view('header','',true);
    $data['menu']=$this->load->view('menu','',true);
    $this->load->view('content', $data);



    Also popular now: