Welcome Guest, Not a member yet? Register   Sign In
Hooks don't work
#9

[eluser]Kamarg[/eluser]
If you want to use hooks for this, it seems like the appropriate hook would be display_override. Then you just need to do something like the below.
Code:
$CI =& get_instance();
$content = $CI->load->view('header_file') . $CI->output->get_output() . $CI->load->view('footer_file');
$CI->output->_display($content); // Maybe just echo $content?

Note that this could also be done by having a _output function within your MY_Controller and making sure all your controllers extend MY_Controller.


Messages In This Thread
Hooks don't work - by El Forum - 06-08-2010, 12:27 PM
Hooks don't work - by El Forum - 06-08-2010, 02:30 PM
Hooks don't work - by El Forum - 06-08-2010, 03:28 PM
Hooks don't work - by El Forum - 06-08-2010, 10:48 PM
Hooks don't work - by El Forum - 06-09-2010, 12:42 AM
Hooks don't work - by El Forum - 06-09-2010, 02:03 AM
Hooks don't work - by El Forum - 06-09-2010, 12:34 PM
Hooks don't work - by El Forum - 06-09-2010, 01:05 PM
Hooks don't work - by El Forum - 06-09-2010, 01:47 PM
Hooks don't work - by El Forum - 06-22-2010, 09:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB