Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
MyLayout = Backbone.Marionette.Layout.extend({
template: "#layout-template",
regions: {
myRegion: "#some-div",
anotherRegion: ".another-element"
var myLayout = new MyLayout();;
// somewhere else in the code;;
// from BBCloneMail.Layout.js
var Layout = Backbone.Marionette.Layout.extend({
template: "#layout-template",
// These are my visual regions: the "navigation" or
// left hand list of categories, and the "main"
// content area where the email list or contact list
// is displayed.
regions: {
navigation: "#navigation",
main: "#main"
// more stuff here, including DOM event handlers
// Render the layout and get it on the screen, first
BBCloneMail.layout = new Layout();
var layoutRender = BBCloneMail.layout.render()
// This kicks off the rest of the app, through the router

I was following the example in 4.js, but var layoutRender doesn't seem to be a jquery deferred object. Is this something special I need to set up in render? Backbone docs say render returns the View for chaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment