﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14078	Template tag to set context variable to output from tag's rendered content	Mitar	nobody	"I have made a tag which renders its content and puts the result into the context variable. I believe it would be useful to include it into built-in template tags. The syntax is `{% setcontext as var_name %}...{% endsetcontext %}.

It is most useful when you wan to generate some translated (localized) HTML code and pass it to other tags or filters for processing (especially multiple times):

{{{
{% setcontext as heading %}
{% url view_page page.get_current_id as page_url %}
{% blocktrans with page.name|default:_(""untitled"") as page_name %}
Edit {{ page_element }} for Page <a href=""{{ page_url }}"">{{ page_name }}</a>
{% endblocktrans %}
{% endsetcontext %}
}}}

And then you can use `{{ heading|striptags }}` for HTML `title`, `{% heading 3 heading %}` for rendering heading (a custom template tag) with level 3 and above content.
"		closed	Template system	1.2		wontfix		mmitar@…	Unreviewed	1	0	0	0	0	0
