I've just set up a layout hook to streamline some of my own work, however, I've just realized my profiler has disappeared. I'm not quite sure what I need to do to get it back.
If I set
Code:
$config['enable_hooks'] = FALSE
profiler re-appears, but breaks my layout of course. I'm assuming I've got to add a bit to my hook class, but I'm not sure where or what at this point.
PHP Code:
class Layout {
public function index()
{
$CI =& get_instance();
$current_output = $CI->output->get_output();
if ($CI->uri->segment(1) == 'admin')
$layout_file = APPPATH . 'views/admin/layout.php';
else
$layout_file = APPPATH . 'views/frontend/layout.php';
$layout = $CI->load->file($layout_file, true);
$mod_output = str_replace("{yield}", $current_output, $layout);
//echo $layout_file;
echo $mod_output;
}
}
And of course, I've set
PHP Code:
$this->output->enable_profiler(TRUE);
in my Controller.
Any suggestions or help would b greatly appreciated!