4

Does any nodejs template engine support the template inheritance function like 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}
Lagoonwish
  • 51
  • 2

1 Answers1

1

Try the LinkedIn fork of dust.js: https://github.com/linkedin/dustjs

It will look something like this:

{+head}default layout content{/head}

dust.js also supports the following: - async/streaming operation - browser/node compatibility - extended Mustache/ctemplate syntax - clean, low-level API - high performance - composable templates

Rocky
  • 391
  • 5
  • 14