Welcome Guest, Not a member yet? Register   Sign In
variables in functions in views
#2

[eluser]bigtony[/eluser]
Well, you could put the function in a helper or library and call it that way, but your calls really ought to be done in the controller rather than the view. So your controller loads the data you need (typically from a model or sometimes from libraries/helpers) and puts that data into an array which you pass to the view.

The only programming 'logic' that should go in a view is just that required to render how it looks on the page - nothing else.


Messages In This Thread
variables in functions in views - by El Forum - 08-24-2009, 09:08 PM
variables in functions in views - by El Forum - 08-25-2009, 01:21 AM
variables in functions in views - by El Forum - 08-25-2009, 06:31 PM
variables in functions in views - by El Forum - 08-25-2009, 07:02 PM
variables in functions in views - by El Forum - 08-25-2009, 07:32 PM
variables in functions in views - by El Forum - 08-25-2009, 08:25 PM
variables in functions in views - by El Forum - 08-25-2009, 08:34 PM
variables in functions in views - by El Forum - 08-25-2009, 11:26 PM
variables in functions in views - by El Forum - 08-25-2009, 11:46 PM
variables in functions in views - by El Forum - 08-26-2009, 08:37 AM
variables in functions in views - by El Forum - 08-26-2009, 05:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB