I'm having difficulty getting template inheritance to work properly. I'm finding that I can get index/layout working well, but that it's not including other extended blocks. For example, here's my layout.jade file:
#wrapper
block tester
// Side bar
#list
ul#friend-list.browser
li#friends.label Friends
li#following.label Following
// Content
block content
In the same directory I have index.jade and tester.jade. index.jade contains the following, and works:
extends layout
block content
.content
.row-fluid
.span12
.row-fluid
#browser-toolbar.span12.toolbar
.row-fluid
.span12
#bento
tester.jade looks like this, and doesn't work:
extend layout
block tester
h1 hello world
I'm currently using Express v.3.0b4. Can anyone help explain why this isn't working? It doesn't throw an error -- it just doesn't render the tester.jade file at all.
Is it just a matter of using extends
with an 's' vs extend
?
Express 3.x significantly changed view handling and no longer automatically references a layout. Check the migration guide.