best practices: what's best proceed constructing headers footers?


what's best proceed constructing headers, footers? should controller, consolidate perspective file? i'm controlling codeigniter, i'm wanting know what's best use this. loading enclosed perspective files controller, this?



class page extends controller {

duty index()
{
$data['page_title'] = 'your title';
$this->load->view('header');
$this->load->view('menu');
$this->load->view('content', $data);
$this->load->view('footer');
}

}


or job unparalleled perspective file, job header footer views there:



//controller record    
class page extends controller {

duty index()
{
$data['page_title'] = 'your title';
$this->load->view('content', $data);

}

}

//view file

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

<p>the information controller</p>

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


i've seen finished both ways, nonetheless wish select before i too distant down path.



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members