Regions in CompositeView

163 views
Skip to first unread message

Jason Lock

unread,
Jan 24, 2014, 6:24:26 PM1/24/14
to backbone-...@googlegroups.com
I have a accordion style menu thats created from a CollectionView and CompositeView (http://davidsulc.github.com/backbone.marionette-nested-views/). I need the expanded content of the accordion to be dynamic and have its own controller and model. I was thinking of nesting a region as the accordions content area so I can use open/close from within the expanded content controller. Is this a good idea or is there another approach I should try. 

Thanks for the help!

Dustin Nation

unread,
Feb 6, 2014, 4:53:01 PM2/6/14
to backbone-...@googlegroups.com
I don't think its a terrible idea.

I wonder if its possible to specify a LayoutView as the collection's itemView since:
Layout is a hybrid of an ItemView and a collection of Region objects. They are ideal for rendering application layouts with multiple sub-regions managed by specified region managers.

If not I guess that's why they made region managers available outside of layouts :)
Reply all
Reply to author
Forward
0 new messages