Welcome Guest, Not a member yet? Register   Sign In
How to handle controller for every reload ?
#6

[eluser]meigwilym[/eluser]
Here's a quick example using a simple app that I'm currently building.

I've got two global views header.php and main.php.

Each file has <?php echo $content; ?>.

header.php is the html for the <head> and main.php has everything else.

I then have more views, with 2 or 4 columns, which I can use as I want.

In the controller I have

Code:
// load some JS first...
$head['content'] = $this->load->view('jquery', '', TRUE);

// then get the html...
$html = $this->yourmodel->get();

$data['content'] = $this->load->view('two-col', $html, TRUE);

$this->load->view('_global/header', $head);
$this->load->view('_global/main', $data);


Messages In This Thread
How to handle controller for every reload ? - by El Forum - 09-30-2008, 03:22 AM
How to handle controller for every reload ? - by El Forum - 09-30-2008, 04:14 AM
How to handle controller for every reload ? - by El Forum - 09-30-2008, 04:29 AM
How to handle controller for every reload ? - by El Forum - 09-30-2008, 05:18 AM
How to handle controller for every reload ? - by El Forum - 09-30-2008, 07:18 AM
How to handle controller for every reload ? - by El Forum - 09-30-2008, 09:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB