I put the ejs template ejs in the views folder, for example:
views | |--foo.html | |--layout.html
so i am customizing my ejs template:
app.set('views', __dirname + '/views'); app.engine('html', require('ejs').renderFile);
I draw my foo template as follows:
res.render('foo.html', {title: 'test'});
I want to use layout.html as a layout template, I also add the <%- body%> to layout.html but it doesnβt work, what I saw only returns the completed foo.html .
Why layout.html n't layout.html be the main layout? Or how can I install it on the layout of the wizard?
source share