title: Backbone Marionette Composite View Rendering Template
body: <p>I'm trying to render a list with a Marionette CompositeView.  I am not sure why the rendered list just has an item displaying the word <code>result</code>.  I was expecting the first item to display <code>Level 1</code>.</p>
  
  <p>Here is a fiddle to my current code:  <a href="http://jsfiddle.net/16L1hen4/" rel="nofollow">http://jsfiddle.net/16L1hen4/</a></p>
  
  <p>Here is my JS, template, and data:</p>
  
  <p>JavaScript:</p>
  
  <pre><code>var App = new Backbone.Marionette.Application();
  
  App.addRegions({
      mainRegion: '#main' 
  });
  
  var TreeModel = Backbone.Model.extend({    
  });
  
  var TreeCollection = Backbone.Collection.extend({
      model: TreeModel,
  
      url: 'https://api.mongolab.com/api/1/databases/backbone-tree/collections/tree?apiKey=somekey'
  
  });
  
  var TreeView = Backbone.Marionette.CompositeView.extend({
  
      initialize: function() { 
          console.log(this.collection); 
  
      },
  
      tagName: 'ul',
  
      template: _.template( $('#tree-template').html() )
  });
  
  var treeCollection = new TreeCollection();
  treeCollection.fetch().done(function () {
      var treeView = new TreeView({collection: treeCollection});
      App.mainRegion.show(treeView);    
  });
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>&lt;div id="main"&gt;&lt;/div&gt;
  
  &lt;script type="text/template" id="tree-template"&gt;
      &lt;li&gt;&lt;%- name %&gt;&lt;/li&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>JSON Data:</p>
  
  <pre><code>{
      "_id": {
          "$oid": "54adab80e4b0aa674b256836"
      },
      "name": "Level 1",
      "children": [
          {
              "name": "Child 1 - Level 2",
              "children": [
                  {
                      "name": "Jon - Level 3"
                  },
                  {
                      "name": "Mary - Level 3"
                  }
              ]
          },
          {
              "name": "Child 2 - Level 2",
              "children": [
                  {
                      "name": "Bill - Level 3"
                  }
              ]
          }
      ]
  }
  </code></pre>