Presently, new template variables can be easily assigned from within a template by leveraging the assign template tag. This works fine, but there is presently no way to "locally" define a variable that shouldn't be available to the whole template.
To palliate that, let's introduce a with tag that would work like that:
The defined variables should only be available within the {% with %}...{% endwith %} tags, which could easily be achieved by leveraging the existing template context stacking capability.
Description
Presently, new template variables can be easily assigned from within a template by leveraging the
assign
template tag. This works fine, but there is presently no way to "locally" define a variable that shouldn't be available to the whole template.To palliate that, let's introduce a
with
tag that would work like that:The defined variables should only be available within the
{% with %}...{% endwith %}
tags, which could easily be achieved by leveraging the existing template context stacking capability.