[eluser]RaZoR LeGaCy[/eluser]
[quote author="Bramme" date="1213012624"]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][/quote]
This is the best way that I know of and everyone should do it like this.