0

I see ways to remove from ItemViews and Layouts but not the CollectionView. Override attachHTML? Using the CollectionView's tagName property to target an element won't work for me because I need the collection items to render directly into an already existing DOM element, not a new one generated by the CollectionView.

Robert
  • 828
  • 2
  • 13
  • 28

1 Answers1

3

You can specify the el attribute when creating an instance of the Collection view, if all that you want is your view to use an existing dom element for the collection view el rather than creating it.

var collectionView = new Marionette.CollectionView({el: '#existingElement'});

Reference: Backbone.View-el(Marionette views extend from the Backbone.View)

Akshad
  • 81
  • 3