Closed samholmes closed 11 years ago
app.locals.layout = 'layout.ejs'; was the culprit
Yep. If you do app.locals.layout = 'foo.ejs'
then it overwrites the layout helper and you can't call it from templates.
See https://github.com/RandomEtc/ejs-locals/#backwards-compatibility - the short answer is use app.locals._layoutFile = 'foo.ejs'
if you want to set the layout from your app code, and use layout('foo')
if you want to set it from your template.
Stupid error:
Child template:
Part of the app.js file:
What else do I need to post that would help with this problem? I'm following the instructions on how to use this library, but it doesn't work.