I am trying to pass a layout to a CollectionView and then manipulate its interior areas.
Now I am successfully sending the layout to the CollectionView (which is in its own region) like this:
main_layout.main_region.show(new CollectionView({ itemView: ALayout, collection : someCollection }));
Then I see that the layout gets rendered. However, I cannot find a way to change (or even touch) the regions in "ALayout". Is there any way to do this? In the end, I'm trying to get a collection of βpanelsβ with a layout inside each of them that has the same regions, and somehow draws these regions.
Also, I initially just passed the ItemView to the CollectionView, but I could find a way to add regions to this ItemView. If possible, I would like to manage these regions in the file that I transferred (whether it be a layout or an ItemView).
Does anyone have any experience?
Edit: Okay, so I found a hint using the Backbone.BabySitter that comes with Marionette - from this documentation that talks about CollectionView children here . So now my code looks like this.
var collectionViewToUse = new CollectionView({ itemView: ALayout, collection : someCollection }); main_layout.main_region.show(collectionViewToUse); collectionViewToUse.children.each(function(view) { console.log(view);
The instance of the trunk is being registered, so I think I'm here for something here. Can someone tell me how to manipulate regions from this step?
source share