Welcome Guest, Not a member yet? Register   Sign In
What is the best way to write organize your code?
#4

[eluser]Mareshal[/eluser]
[quote author="gtech" date="1245450715"]these are things I can immediatly think of.. hope it helps[/quote]
Now only hope...this really helps a lot. Thanks.

Yes, I am keeping html away from controller, even if I am tempted to put some html there, and same with models. I have html only in views.

Can I pass variables to a view from a model with $this->view->load('view', $data)

I don't understand this
Quote:12) when passing a data array to a view don’t forget the keys in the associative array become the variables in the view.

13) Once an associtive array has been passed to a view, the variables are available in EVERY other view in the same request, without having to pass the array to them again.

Can you please give me a simple example?


Messages In This Thread
What is the best way to write organize your code? - by El Forum - 06-19-2009, 10:00 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 11:31 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 11:48 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 11:52 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 12:12 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 12:24 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 12:26 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 03:10 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 03:52 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 03:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB