mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.59k stars 641 forks source link

Jinja2 with extension #873

Open ghost opened 8 years ago

ghost commented 8 years ago

Could we implement the with extension from jinja2? http://jinja.pocoo.org/docs/dev/extensions/#with-extension

Additional information: http://jinja.pocoo.org/docs/dev/templates/#with-statement http://stackoverflow.com/questions/9404990/how-to-pass-selected-named-arguments-to-jinja2s-include-context

netpedro-com commented 7 years ago

Duplicated: https://github.com/mozilla/nunjucks/issues/539

ArmorDarks commented 7 years ago

Meanwhile, in most cases it's possible to use macro instead of include.