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
Post a Comment