Welcome Guest, Not a member yet? Register   Sign In
Equavalent of Cake "Elements"
#3

[eluser]Bramme[/eluser]
You're right m4rw3r, it does share it...

What often do is create an index view file that looks like this

Code:
<?php
$this->load->view('header');
$this->load->view($page);
$this->load->view('footer');
?>

And then you can make your controller look like
Code:
//do lots of nifty things
$data['page'] = 'myviewfile';
$this->load->('index', $data);

All variables passed to index, will get passed to footer, header and $page.


Messages In This Thread
Equavalent of Cake "Elements" - by El Forum - 07-18-2008, 02:34 PM
Equavalent of Cake "Elements" - by El Forum - 07-19-2008, 07:58 AM
Equavalent of Cake "Elements" - by El Forum - 07-19-2008, 12:06 PM
Equavalent of Cake "Elements" - by El Forum - 07-20-2008, 10:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB