Welcome Guest, Not a member yet? Register   Sign In
loading separated layout views
#1

[eluser]Ngulo[/eluser]
hi , does anyone can suggest me the best way to separate layouts views such as:

header_view.php
footer_view.php
menu_view.php

into CI 2.0.2 ?


did you use some good structure to do that?
#2

[eluser]InsiteFX[/eluser]
Something like below, but you can also download template and layout libraries!

application/views/template.php
Code:
<?php $this->load->view('header');?>

<?php $this->load->view('nav');?>

<?php $this->load->view('content');?>

<?php $this->load-view('footer');?>

Controller:
Code:
$data = array();

    $data['title'] = 'Title';

    $this->load->vars($data);
    $this->load->view('template');

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB