Support for Jinja's Block Assignments would be nice.
These allow writing {% set <var_name> %} blocks that store the block-content to the variable name:
{% set navigation %}
<li><a href="/">Index</a>
<li><a href="/{{downloads_url}}">Downloads</a>
{% endset %}
Filters applied to the variable name will be applied to the block’s content:
{% set reply | wordwrap %}
You wrote:
{{ message }}
{% endset %}
My idea of implementing this would be somewhere along the lines of generating:
{
let mut __askama_writer = String::new();
// ... block-content as rust code
__askama_writer
}
Support for Jinja's Block Assignments would be nice.
These allow writing
{% set <var_name> %}blocks that store the block-content to the variable name:Filters applied to the variable name will be applied to the block’s content:
My idea of implementing this would be somewhere along the lines of generating: