Hooking display_override - $this->output->get_output not working |
[eluser]Stuart Marsh[/eluser]
I'm trying to use the display_override hook to edit output before it gets to the user. I created the following hook: Code: class display_hook { I get this error: Code: Message: Undefined property: Display_Hook::$output Code: class display_hook extends Controller { Code: Message: Undefined property: Display_Hook::$DB_Content So I have two questions: 1 - What is the correct format for a hook class so I can use $this->output->get_output()? 2 - Why can't I load a model when I extend the controller for my hook? Any help would be appreciated.
[eluser]Unknown[/eluser]
Are you ensuring that you make a reference to the CI superobject before you make a call to get_output on it? i.e.: Code: $this->CI =& get_instance();
[eluser]Stuart Marsh[/eluser]
oops should have updated this. I posted this as a bug here: http://codeigniter.com/bug_tracker/bug/4512/ The manual used to say that $this->output->get_output() would work, but has since been changed to reflect the correct code. |
Welcome Guest, Not a member yet? Register Sign In |