0

我可以有一个 layout.jade 文件吗:

h1 Layout File  
 block content

然后是一个 index.jade 文件:

extends layout
.span4.whatever
p some code goes here
block another-code-block

然后是第三个 thirdfile.jade 文件:

extends index
.row-fluid
a.poo a.boo
这是行不通的。两者都没有扩展布局。有没有办法做到这一点?

4

1 回答 1

0

是的,它有效

布局

 h1 Layout File  
 block content  //this is block content

指数

extends layout //extend layout..
block content  //... at the block "content"
    .span4.whatever
    block asdasd  //this is block asdasd

第三文件

extends index //extend index
block asdasd //at block "asdasd" (so it replaces asdasd and everything in "asdasd")
    .span5.whatever
于 2013-07-14T09:33:06.230 回答