-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
是否支持block嵌套 #468
Comments
如题,很多nodejs端,老牌的模板渲染器都支持 nested block,在稍微复杂的一点的场景下,为了复用,而不得不采用这种方式。 |
yinheli
added a commit
to yinheli/art-template
that referenced
this issue
Oct 19, 2017
调整了 block 函数格式,多行输出 对嵌套 block (通过名称重复判断)分支处理 增加 嵌套 block 的例子
#487 fixes this problem. |
Open
aui
added a commit
that referenced
this issue
Aug 21, 2018
已经发布 |
好像还是不能嵌套: {{block ‘block1’}} {{block 'header1'}} {{/block}} {{block 'header2'}} {{/block}} {{block 'header3'}} {{/block}} {{block 'header4'}} {{/block}} {{block 'header5'}} {{/block}} {{/block}}content.art: {{block 'header1'}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考Pug的案例
Things of note:
You can have an unlimited number of blocks with different names - for example, the one in our example is called content. You can decide to override any of them from a template, all of them, or none at all. It's up to you.
话说支持extend多级,同时要支持block嵌套是一个基本的模板渲染功能。
The text was updated successfully, but these errors were encountered: