I'm using "Jade" view engine with CompoundJS, however it doesn't use the proper Jade workflow when I call the render() method within a controller (e.g. its always rendering the same layout, yielding the inner template as the body parameter of the layout).
I need to know how to either:
- Change the layout from the controller (its always using application_layout.jade) and be able to render without layout
- Render views normally, so that I have the layout specified within the view template itself (e.g. by specifying explicitly which template I'm extending, with a Jade directive like "extend layout")
You can override the
application_layoutwith your own. It is convention-based.For example, if you want to override the
loginview with a different layout, you would add a new templateapp/views/layouts/login_layout.ejs.The inner template is specified as
<%- body %>.