Welcome Guest, Not a member yet? Register   Sign In
Global Var inside Constructor to pass to view
#4

[eluser]n0xie[/eluser]
[quote author="pyrokinesis" date="1251984496"]

I'm trying to set up a default value that is set in the constructor and passed passed to every view unless overwritten from within the specific controller.
[/quote]

You would be better of just extending the Controller Class. In MY_Controller you set all your default values, and unless overwritten from within your controller, it will use those values. It's easier and cleaner.
http://ellislab.com/codeigniter/user-gui...asses.html


Messages In This Thread
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 02:15 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 02:20 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 02:28 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 03:04 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 03:32 AM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 12:10 PM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 01:32 PM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 01:55 PM
Global Var inside Constructor to pass to view - by El Forum - 09-03-2009, 08:22 PM
Global Var inside Constructor to pass to view - by El Forum - 08-17-2011, 06:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB