Skip to main content

David Fisher

Member since Jul 12, 2012

Recent Blog Comments By David Fisher

  • How Do You Populate Shared Views In A Complex Layout Using MVC?

    Posted on Jul 13, 2012 at 6:17 AM

    @Bugli, you also have view helpers in Codeigniter (they probably borrowed it from Zend ;) ) but it always seemed a little messy to me as it involves injecting more server side markup in to the view rather then just foreachs() or JSON via Javascript.... read more »

  • How Do You Populate Shared Views In A Complex Layout Using MVC?

    Posted on Jul 12, 2012 at 1:52 PM

    @Joe, possible an Ajax call via JavaScript to the same controller with a different parameter? So simulating a second user request. @Kirill, wouldn't that make it mvcvm? model-control-view-model. I think the point of the mvc is to seperate concerns so the view never has to know about the model and o... read more »

  • How Do You Populate Shared Views In A Complex Layout Using MVC?

    Posted on Jul 12, 2012 at 11:22 AM

    I would normally use a helper class/function shared across controllers if i was using multiple controllers or a this->loadsecondmodelcall method in a singular controller then return the data as a named key array to the view ['primary_data']['secondary_data']. I guess my world/take is different ... read more »

  • How Do You Populate Shared Views In A Complex Layout Using MVC?

    Posted on Jul 12, 2012 at 10:59 AM

    Shouldn't the controller handle getting the data from the request for both the primary and secondary areas before passing it to your view? Hence using two models. Looking around i have not seen a way around it other then big capitals saying a view SHOULD NEVER directly call a controller.... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel