[eluser]Colin Williams[/eluser]
Quote:There is probably a better way to do it so you don’t have to include the file in every controller
Create the parent controller in application/libraries/MY_Controller.php
CodeIgniter will expect that it's an extension to the controller library and load it automatically
But to the main question raised, and I'm not saying extending the controller won't work, this is partly the reason I developed the Template library, and why so many others have written and distributed similar solutions. If you approach output handling as being the sole responsibility of the given controller method, you're going to run into this problem over and over again. What Template does is allow the given controller method access to modify and control the ultimate output, while also providing access to any other component running for the given request (a library, a hook, etc.) In this way, your app is more flexible with regards to what is output.