I have two options when I want to specify a layout when rendering a template with express;
req.app.locals.layout = "foo";
or
res.render("mytmp", { layout: "foo", data: bar });
Just as there are a few other alternatives (express-hbs), it must be a way to make it declarative.Is there a similar way of doing this without doing it in the code?
I have two options when I want to specify a layout when rendering a template with express;
req.app.locals.layout = "foo";
or
res.render("mytmp", { layout: "foo", data: bar });
Just as there are a few other alternatives (express-hbs), it must be a way to make it declarative.Is there a similar way of doing this without doing it in the code?
I want to do this if nobody is working on it yet.