【问题标题】:Does any nodejs template engine support the template inheritance function like PHP Smarty?有没有nodejs模板引擎支持像PHP Smarty这样的模板继承功能?
【发布时间】:2013-04-19 11:15:25
【问题描述】:

有没有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}

【问题讨论】:

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


【解决方案1】:

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

它看起来像这样:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-04
    • 1970-01-01
    • 2012-01-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多