Welcome Guest, Not a member yet? Register   Sign In
Multiple pages
#5

[eluser]BlueGemini[/eluser]
[quote author="theprodigy" date="1263899986"]Try storing your views into variables that you pass to your views
Code:
$data['div1'] = $this->load->view('mydiv1', '', true);
$data['div2'] = $this->load->view('mydiv2', '', true);
$this->load->view('layout',$data);

then just output your variables in the layout.php view

Code:
<html>
<head>
<title>My Layout</title>
</head>
<body>
<div id="div1">
&lt;?php echo $div1; ?&gt;
</div>
<div id="div2">
&lt;?php echo $div2; ?&gt;
</div>
&lt;/body&gt;
&lt;/html&gt;

Is that more of what you are looking for?[/quote]

Hey, it work. :cheese: didn't thought about that... :-P

One more question. What is the difference of having a TRUE?

Code:
$data['div1'] = $this->load->view('mydiv1', '', true);

Thank you very much! ;-)


Messages In This Thread
Multiple pages - by El Forum - 01-18-2010, 11:01 PM
Multiple pages - by El Forum - 01-18-2010, 11:06 PM
Multiple pages - by El Forum - 01-18-2010, 11:12 PM
Multiple pages - by El Forum - 01-18-2010, 11:19 PM
Multiple pages - by El Forum - 01-19-2010, 12:10 AM
Multiple pages - by El Forum - 01-19-2010, 12:27 AM
Multiple pages - by El Forum - 01-19-2010, 12:34 AM
Multiple pages - by El Forum - 01-19-2010, 12:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB