Welcome Guest, Not a member yet? Register   Sign In
Nested Views Rendering Out of Order
#3

[eluser]fesweb[/eluser]
When output shows up earlier than expected, it usually points to something being echo'ed out rather than being put into CI's output buffer.

Are you familiar with the optional third parameter when loading a view? It allows you to return teh view as a string to be output later.

From the docs:
Quote:There is a third optional parameter lets you change the behavior of the function so that it returns data as a string rather than sending it to your browser. This can be useful if you want to process the data in some way. If you set the parameter to true (boolean) it will return data. The default behavior is false, which sends it to your browser. Remember to assign it to a variable if you want the data returned:
$string = $this->load->view('myfile', '', true);
I don't know if it's related to HMVC shenanigans, or standard behavior for this situation, but when you are loading the login form view, the echos are being output directly to the browser.

You could try variations on returning the string and echoing that...
Code:
<?php $login_form = $this->load->view('membership/login_form', '', TRUE); ?>


Messages In This Thread
Nested Views Rendering Out of Order - by El Forum - 04-06-2011, 05:25 PM
Nested Views Rendering Out of Order - by El Forum - 04-06-2011, 05:37 PM
Nested Views Rendering Out of Order - by El Forum - 04-06-2011, 09:40 PM
Nested Views Rendering Out of Order - by El Forum - 04-06-2011, 10:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB