How to use multiple blocks from different files?

Viewed 4586

I have a layout.jade that looks like this:

html
  body
    block content
    block footer

My content.jade looks like that:

extends layout

block content
    #Content Welcome

My footer.jade looks like that:

extends layout

block footer
    #Footer Impressum

Now, when I run my app like that:

app.get('/', function(req, res) {
    res.render('layout');
});

I do not see neither the content nor the footer.

When I run:

app.get('/', function(req, res) {
    res.render('content');
});

Then I see the content.

When I run:

app.get('/', function(req, res) {
    res.render('footer');
});

Then I see the footer.

How can I see both, content and footer?

1 Answers
Related