In version 3 of Express some features were removed:
the concept of a \"layout\" (template engine specific now)
partial() (template engine specific)
It seems that from Express 3, layout feature is delegated to the responsibility of template engines. You can use ejs-locals (https://github.com/RandomEtc/ejs-locals) for layout.
Install ejs-locals
npm install ejs-locals --save
Use ejs-locals as your app engine in app.js
var express = require('express');
var engine = require('ejs-locals');
...
app.engine('ejs', engine);
app.set('view engine', 'ejs');
Now you can use layout
layout.ejs
<%- body %>
index.ejs
<% layout('layout') -%>
...
Another option is to use express-partials (https://github.com/publicclass/express-partials). The two do the same thing, so it's just your choice.