I have a CollectionView
class MyCollectionView extends Backbone.Marionette.CollectionView
itemView: MyItemView
itemViewOptions: ->
{
indexInCollection: ?
}
And I want MyItemView to know at which index in the collection its model is at.
I suppose, in the MyItemView, I can find it out via
@model.collection.indexOf(@model)
But is there a way to pass it in directly into MyItemView from my Marionette CollectionView, using some internal Marionette mechanism? Is this index exposed somewhere already?