Welcome Guest, Not a member yet? Register   Sign In
What's the practical way to load header and footer
#6

[eluser]Bramme[/eluser]
Same as armchair samurai... I create a masterviewfile like this

Code:
<?php
//master view - index.php
$this->load->view('header');
$this->load->view($page);
$this->load->view('footer');
?>
And then from my controller

Code:
$this->data['page'] = 'somepage';
$this->load->view('index', $this->data);

Seeing as your data gets transferred to your 'subviews' automatically, it works as a charm!
[/code]


Messages In This Thread
What's the practical way to load header and footer - by El Forum - 06-08-2008, 09:04 PM
What's the practical way to load header and footer - by El Forum - 06-08-2008, 09:25 PM
What's the practical way to load header and footer - by El Forum - 06-08-2008, 09:47 PM
What's the practical way to load header and footer - by El Forum - 06-08-2008, 09:48 PM
What's the practical way to load header and footer - by El Forum - 06-08-2008, 10:13 PM
What's the practical way to load header and footer - by El Forum - 06-09-2008, 12:57 AM
What's the practical way to load header and footer - by El Forum - 06-09-2008, 01:08 AM
What's the practical way to load header and footer - by El Forum - 06-09-2008, 10:29 AM
What's the practical way to load header and footer - by El Forum - 06-09-2008, 12:16 PM
What's the practical way to load header and footer - by El Forum - 06-22-2008, 05:34 PM
What's the practical way to load header and footer - by El Forum - 06-22-2008, 05:53 PM
What's the practical way to load header and footer - by El Forum - 06-22-2008, 05:56 PM
What's the practical way to load header and footer - by El Forum - 06-23-2008, 09:29 AM
What's the practical way to load header and footer - by El Forum - 06-23-2008, 10:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB