2

I have this code:

res.status(200).render('body_loggedin', usernameDocs[0]);

to render the data from usernamedocs[0] into the 'body_loggedin' view but I don't want it to to have the main layout. Every answer to similar questions doesn't address this.

Thank you for any help!

nicholaswmin
  • 21,686
  • 15
  • 91
  • 167
Danjuro
  • 141
  • 1
  • 8

1 Answers1

2

You can pass an options object, specifying the layout:

res.render('foo-template', { layout: 'foo', data: 'bar' })
nicholaswmin
  • 21,686
  • 15
  • 91
  • 167