Skip to content

Instantly share code, notes, and snippets.

@caseycesari
Created January 22, 2013 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caseycesari/4596328 to your computer and use it in GitHub Desktop.
Save caseycesari/4596328 to your computer and use it in GitHub Desktop.
axis.Views.ArticleContainer = Backbone.View.extend({
tagName: 'div',
className: 'row article-container view',
initialize: function() {
this.template = _.template($('#single-article-container-template').html());
this.article = new axis.Views.Article({model: this.model});
this.sidebar = new axis.Views.ArticleSidebar({model: this.model});
},
render: function() {
this.$el.html(this.template({}));
this.$el.find('#sidebar').html(this.sidebar.render().el);
this.$el.find('#story').html(this.article.render().el);
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment