任何nodejs模板引擎是否支持PHP Smarty之类的模板继承功能?

时间:2013-04-19 11:15:26

标签: node.js smarty template-engine template-inheritance

任何nodejs模板引擎是否支持模板继承功能,如PHP Smarty?

{block name=head}
default layout content
{/block}

{block name=head}
if page have customize the content it display the customize content, otherwise display the layout content
{/block}

1 个答案:

答案 0 :(得分:1)

尝试使用dust.js的LinkedIn分支:https://github.com/linkedin/dustjs

看起来像这样:

  

{+ head}默认布局内容{/ head}

dust.js还支持以下内容: - 异步/流媒体操作 - 浏览器/节点兼容性 - 扩展的Mustache / ctemplate语法 - 干净,低级的API - 高性能 - 可组合模板