Hello, We've recently been trying to come up with a good set of logic for a small project with MVC and FB. We have most the model and view understood and ready to be pieced together with the controller to make up the site. Here's the tough part for me: In the controller circuit we have about about 10 calls to different fuseactions getting and displaying data. This stuff needs to be displayed in a pretty graphical format (modules all over the page(left/right/top/bottom/middle) and it has a couple different looks and navigation systems depending on what site your on, man. I need some advice on how to do lay this stuff out or maybe I need to go back to school.
In the model circuit I have fuse actions like: model_a.getdata model_b.getdata model_c.getdata model_nav.getnavigation1 model_nav.getnavigation2 ... in the view circuit fuseactions like: view_a.showdata view_b.showdata view_c.showdata view_nav.shownavigation1 view_nav.shownavigation2 ... <!---The controller is mapped out something like this---> <cfcase value="look1"> <---this points to the fusebox.layoutFile in fbx_layouts---> <cfset fuseboxlayoutfile = attributes.whichlayoutfile> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="model_a.getdata" site_id=#attributes.site_id#> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="view_a.showdata" site_id=#attributes.site_id#> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="model_b.getdata" site_id=#attributes.site_id#> <cmodule template="#fusebox.rootpath#/#self#" fuseaction="view_b.showdata" site_id=#attributes.site_id#> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="model_nav.getnavigation1" site_id=#attributes.site_id#> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="view_nav.shownavigation1" site_id=#attributes.site_id#> ... more of the same </cfcase> One thought I had is to output view modules within the layout file. This would require some kind of switching logic. Does this make sense or am I stupe! <!---same controller circuit ---> <cfcase value="look1"> <cfset fuseboxlayoutfile = attributes.look1> <cfset fuseboxlayoutfile = attributes.whichlayoutfile> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="model_a.getdata" site_id=#attributes.site_id#> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="model_b.getdata" site_id=#attributes.site_id#> <cfmodule template="#fusebox.rootpath#/#self#" fuseaction="model_nav.getnavigation1" site_id=#attributes.site_id#> <!---do the appropiate cfmodule calls of the views in the fbx_layouts.cfm---> </cfcase> Is this cool to do it this way or should it go into another circuit outside of the controller circuit and put it all together into a pretty format? Any help/advice would be appreciated. Doug ==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================
