title: Passing arguments to a backbone view
body: <p>Just getting started with Backbone. I have a generic view that can render a collection as a list with a title. I'm currently passing the collection and title into the render method, but that seems a bit odd. Is there another way that's more canonical?</p>
  
  <p>E.g.:</p>
  
  <pre><code>var ListView = Backbone.View.extend({
      template: _.template([
          "&lt;div&gt;",
          "&lt;% if (title) { %&gt;&lt;h2&gt;&lt;%= title %&gt;&lt;/h2&gt; &lt;% } %&gt;",
          "&lt;% if (items.length &gt; 0) { %&gt;",
          "&lt;ul&gt;",
              "&lt;% items.each(function(item) { %&gt;",
              "&lt;%= itemTemplate(item) %&gt;",
              "&lt;% }); %&gt;",
          "&lt;/ul&gt;",
          "&lt;% } else { %&gt;&lt;p&gt;None.&lt;/p&gt;&lt;% } %&gt;",
          "&lt;/div&gt;"
      ].join('')),
  
      itemTemplate: _.template(
          "&lt;li&gt;&lt;%= attributes.name %&gt; (&lt;%= id %&gt;)&lt;/li&gt;"
      ),
  
      render: function(items, title) {
          var html = this.template({
              items: items /* a collection */,
              title : title || '',
              itemTemplate: this.itemTemplate
          });
  
          $(this.el).append(html);
      }
  });
  
  var myView = new ListView({ el: $('#target') });
  myView.render(myThings, 'My Things');
  myView.render(otherThings, 'Other Things');
  </code></pre>