Welcome Guest, Not a member yet? Register   Sign In
Dynamic Footer problem
#5

[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.


Messages In This Thread
Dynamic Footer problem - by El Forum - 09-02-2008, 01:04 PM
Dynamic Footer problem - by El Forum - 09-02-2008, 04:28 PM
Dynamic Footer problem - by El Forum - 09-02-2008, 06:56 PM
Dynamic Footer problem - by El Forum - 09-02-2008, 07:34 PM
Dynamic Footer problem - by El Forum - 09-02-2008, 08:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB