Welcome Guest, Not a member yet? Register   Sign In
load view without cookies
#1

[eluser]carnalito[/eluser]
Hi folks,

first, happy new year to all of you!

My problem - if i do this with ACCEPTING cookies:

Code:
$this->load->view('login');
$content = $this->output->get_output();

I get the content of the view in my var "$content".

If I do this NOT ACCEPTING cookies, the var is empty and the view is printed directly on the screen...

Has anybody an idea about the reason?!

thanks

hartmut
#2

[eluser]virexmachina[/eluser]
I'm not sure exactly what you're trying to do, but I believe this is the right way to capture a view in a variable:

Code:
$content = $this->load->view('login', '', true);

I have no idea why cookies would change your code up there though.
#3

[eluser]carnalito[/eluser]
Thanks for your reply.

I just wanted to implement a Hook to catch the content and put this content into a template coming from another site.

Why this is different using cookies or not is also a miracle to me, maby someone have a clue!?

Regards
#4

[eluser]virexmachina[/eluser]
Perhaps one of your libraries or helpers are pushing content to the output buffer before you get_output().

Disabling all of your autoloaded classes, including session classes, create a barebones controller that is only performing this action and then slowly build up from there.




Theme © iAndrew 2016 - Forum software by © MyBB