0
votes

In may Marionette app I do have set a layout with 3 regions

  1. headerRegion
  2. mainRegion
  3. footerRegion

I am using the footer region to display detail views of my models (itemViews).

Now I do have the situation, that I want to use this region with collectionView in combination with a button-group: Add-Button (adds a model/itemView) and a OK-Button (closes/hides the collectionView and the button-group. I would like to handle these 2 itemViews as a component, showing and hiding them in 1 step.

I am not sure what the right way to do this is.

Option1: show collection view in subregion1 of footerRegion and the button-group in subregion2 of footerRegion

Option2: create a new Layout and nest it

Option3: do it somehow with a compositeView?

Option4: some combination with jquery hide/show the button-group?

1

1 Answers

4
votes

My vote is for Option #2: nested layout. I do this a lot and it works very well. It's easy to manage and easy to work with, IMO.