I don't want it to be layout.ejs.
I want to set my layout to be another template for THIS specific controller.
I don't want it to be layout.ejs.
I want to set my layout to be another template for THIS specific controller.
Just set layout property in express app settings.
app.set('layout', 'layouts/layout');
Just pass layout as render locals object.
app.get('/', function(req, res) {
res.render('the-view', { layout: 'specific-layout' });
);
More info here: https://www.npmjs.com/package/express-ejs-layouts