Welcome Guest, Not a member yet? Register   Sign In
Using Nested MVC for View partials (Updated)
#7

[eluser]wiredesignz[/eluser]
Using this method your page view fragments (partials) can manage themselves, this seperates building each partial view, away from the page controller.

Ask yourself how often you repeat the same code within different page controllers? Then you might see the benefit.

Another advantage is that views aren't rendered until the page controller code is finished executing, compared to the common $data = load->view() method which renders HTML into variables.

The only two components you need are the View Library and your Plugin, the rest of this long post serves merely as proof of concept.

As far as the CI wiki is concerned, I think I'll wait until something better is developed. Wink


Messages In This Thread
Using Nested MVC for View partials (Updated) - by El Forum - 02-03-2008, 05:56 PM
Using Nested MVC for View partials (Updated) - by El Forum - 02-03-2008, 06:03 PM
Using Nested MVC for View partials (Updated) - by El Forum - 02-03-2008, 06:21 PM
Using Nested MVC for View partials (Updated) - by El Forum - 02-03-2008, 06:26 PM
Using Nested MVC for View partials (Updated) - by El Forum - 02-03-2008, 06:49 PM
Using Nested MVC for View partials (Updated) - by El Forum - 02-04-2008, 01:11 AM
Using Nested MVC for View partials (Updated) - by El Forum - 02-04-2008, 01:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB