Show partial without layout.jade file

I use layout.jade as a template for all partitions. layout.jade includes the header, footer, sidebar, etc., and partial ones are what are shown in the body.

Now I have implemented a lightbox with an iframe to show one of the partial ones. The problem is that I don't want the header, footer, etc. displayed inside the lightbox, only a partial jade file.

Is there any way to exclude layout.jade in this case?

Thanks in advance!

+3
source share
1 answer

Yes, here's how:

res.render('template', { layout: false /* ... other parameters */ });

See Express documents in the rendering view . You can also specify a different layout.

+6
source

All Articles