Welcome Guest, Not a member yet? Register   Sign In
__destruct and outputting views
#2

[eluser]drewbee[/eluser]
I think your problem is the fact that the views output is ran before __destruct() happens.
You will have to force Code Igniter to not use its own output, and rather force it out on your own. I know how to output code igniters current setup, however telling it not to output its own data is a mess regardless.


Code:
function __destruct()
{
    $this->load->view('common/footer');
    echo $this->output->get_output();
    die();
}

Why not load the footer view within the links/hot.

This way you are not calling this in your controller, but the view ie

links/hot.php (view)
Code:
echo $this->load->view('header', TRUE);
echo 'this is my hot links view';
echo $this->load->view('footer', TRUE);

I am not sure if that will work or not, but that would be my best method for doing this.

Personally, I just create one global_view file.


Messages In This Thread
__destruct and outputting views - by El Forum - 01-15-2009, 10:16 AM
__destruct and outputting views - by El Forum - 01-15-2009, 10:42 AM
__destruct and outputting views - by El Forum - 01-15-2009, 10:46 AM
__destruct and outputting views - by El Forum - 01-15-2009, 10:05 PM
__destruct and outputting views - by El Forum - 01-16-2009, 12:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB