rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 312 forks source link

Allow custom base layout name #465

Closed ingiulio closed 9 years ago

ingiulio commented 9 years ago

This adds flexibility allowing us to use a base layout with a name different from __layout, which is currently hardcoded into viewEngine. Using a custom template name will be as simple as doing this during the Rendr server creation:

var server = rendr.createServer({
  baseLayoutName: 'myTemplate'
});

Rendr-handlebars is already flexible enough to allow this.

purusho commented 9 years ago

:+1:

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.04%) to 82.8% when pulling 701497fa747d31bb818c8ccd12ab1e76a7a65e62 on ingiulio:allowCustomBaseLayoutName into 5532a66de86bd64c20944276eccb5c87a59f902c on rendrjs:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.04%) to 82.8% when pulling 701497fa747d31bb818c8ccd12ab1e76a7a65e62 on ingiulio:allowCustomBaseLayoutName into 5532a66de86bd64c20944276eccb5c87a59f902c on rendrjs:master.

saponifi3d commented 9 years ago

very :+1: - i've been meaning to do this for a while. thanks and the tests look great :)