Welcome Guest, Not a member yet? Register   Sign In
how do you organise your code so you can re-use things?
#5

[eluser]drewbee[/eluser]
What about creating a mini-view (module) so to speak.

I would personally create a MV approach to this one. The model gets the data, the view displays it. This mini-module MV is then called on the displaying controller page via our standard methods. Nothing wrong with having multiple models/view calls within a single controller.

The little template library that I wrote and use follows this. Create these views so that they are not a full html page, but a section of it. Then load it into the parent template.


Messages In This Thread
how do you organise your code so you can re-use things? - by El Forum - 09-14-2008, 01:11 AM
how do you organise your code so you can re-use things? - by El Forum - 09-14-2008, 02:54 AM
how do you organise your code so you can re-use things? - by El Forum - 09-14-2008, 03:27 AM
how do you organise your code so you can re-use things? - by El Forum - 09-19-2008, 12:27 AM
how do you organise your code so you can re-use things? - by El Forum - 09-19-2008, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB