Help with helpers |
[eluser]InsiteFX[/eluser]
You create a MY_Controller and place it in your libraries folder. Then extend all your new controllers from the MY_Controller. You can place all your duplicated code that you want to run in the MY_Controller. This will show you how to do it! Phil's base classes InsiteFX
[eluser]gyo[/eluser]
@gmask: yeah that is ok, or you can also place the settings in the controller, like: Code: $this->load->helper('my_helper'); This way the variables are 'prettier' inside the view, where you can just use $title, $location, $tagline. But, if you need that piece of code EVERYWHERE, the suggestion of InsiteFX to use MY_Controller is very recomendable. |
Welcome Guest, Not a member yet? Register Sign In |