         @$el.removeClass('editor-node-expanded')
       return result
 
-    onRender: () ->
-      # Add DnD options to content
-      EnableDnD.enableContentDnD(@model, @$el.find('> .editor-node-body > *[data-media-type]'))
-
-      if @model.getParent?()
-        EnableDnD.enableDropAfter(@model, @model.getParent(), @$el.find('> .editor-drop-zone-after'))
-
-    templateHelpers: () ->
-      # For a book, show the ToC unsaved/remotely-changed icons (in the navModel, instead of the OPF file)
-      model = @model.navModel or @model
-
-      return {
-        mediaType: @model.mediaType
-        hasParent: !! @model.getParent?()
-        hasChildren: !! @model.getChildren?()?.length
-        isExpanded: @expanded
-        # Look up the overridden title
-        title: @container?.getTitle?(@model) or @model.get('title')
-        # Possibly delegate to the navModel for dirty bits
-        _isDirty: model.get('_isDirty')
-        _hasRemoteChanges: model.get('_hasRemoteChanges')
-      }
-
     # Override internal Marionette method.
     # This method adds a child list item at a given index.
     appendHtml: (cv, iv, index)->

  'hbs!templates/workspace/sidebar/toc-branch'
], ($, Marionette, controller, EnableDnD, tocBranchTemplate) ->

  return class TocBranchView extends Marionette.CompositeView
    tagName: 'li'
    itemViewContainer: '> ol'

    initialize: (options) ->
      @template = (data) =>
        data.id = @model.id or @model.cid
        return tocBranchTemplate(data)

      @collection = @model.getChildren?()
      # Brought in by either toc's itemViewOptions or tocBranch's itemViewOptions
      @container = options.container

      @listenTo @model, 'change', (model, collection, options) => @renderModelOnly()

      if @collection
        # Figure out if the expanded state has changed (see if we need to re-render the model)
        @listenTo @collection, 'add', (model, collection, options) => @renderModelOnly() if @collection.length == 1
        @listenTo @collection, 'remove', (model, collection, options) => @renderModelOnly() if @collection.length == 0

    # Pass down the Book so we can look up the overridden title
    itemViewOptions: () -> {container: @collection}

    renderModelOnly: () ->
      # **DO NOT** just detach children. They (and descendants) will

        iv.$el.insertBefore($prevChild)
      else
        $container.append(iv.el)

    # Toggle expanded/collapsed in the View
    # -------
