Simple Layout Tips
Posted on 23 September, 2008
A small episode, this focuses on how you can make layouts within your applications.
Show Notes
Method One:
Method Two:
Show Notes
Method One:
Controller:
$data['page'] = "test";
$this->load->view("layout", $data);
In the Layout file:
load->view($page); ?>
Method Two:
Controller:
function index()
{
$this->_load_page($this->load->view("test", array(), TRUE));
}
function _load_page($page)
{
$data['content'] = $page;
$this->load->view("layout", $data);
}
Inside Layout File:
=$content?>
Download in: .mov format | iPod Format
