Welcome Guest, Not a member yet? Register   Sign In
How to use variables from class globally in views
#2

[eluser]Colin Williams[/eluser]
In the controller constructor, pass these "global" template variables with $this->load->vars()

If you need to do this across many controllers, extend the base Controller class with a MY_Controller class (using your own prefix) and do it in the constructor there.

You can read more about all of this in the User Guide and the Wiki


Messages In This Thread
How to use variables from class globally in views - by El Forum - 01-10-2010, 09:02 PM
How to use variables from class globally in views - by El Forum - 01-10-2010, 09:15 PM
How to use variables from class globally in views - by El Forum - 01-10-2010, 09:24 PM
How to use variables from class globally in views - by El Forum - 01-11-2010, 01:38 AM
How to use variables from class globally in views - by El Forum - 01-11-2010, 11:10 AM
How to use variables from class globally in views - by El Forum - 01-11-2010, 05:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB