Reputation: 36715
I am trying to understand how JADE works when there are several templates.
I worked by this tutorial: http://www.franz-enzenhofer.com/jade
But, I got this:
$ curl http://localhost:3000
<h1> <a href="http://www.franz-enzenhofer.com/">Franz Enzenhofer</a></h1>
It seems that the command "res.render('index.jade',..." only took the index.jade template, but didn't insert it into the layout.jade template as should happen...
Upvotes: 0
Views: 1609
Reputation: 16395
I assume you are using partials
. They were removed with express v3. See the View System Changes part for more information.
From express v3 on you should use blocks. For example:
my-template.jade:
extends my-layout
block head
script(src="myfile.js")
block content
h1 My page
my-layout.jade
doctype 5
html
head
title My title
block head
body
#content
block content
Upvotes: 1