I need to pass the result of a template tag to a child template.
Parent template:
{% template_tag param1 param2 as templink %}
{% include "child_template.html" with templink1=templink %}
child_template.html:
<a href="">Download</a>
The result of the template tag is a url which is an input to the href in the child template. The template tag is a simple_tag. Using 'as' for variable assignment breaks the app.
What are the possible alternatives to evaluate the template tag and pass the url to the child template?
Accept the context in the templatetag
template_tagand store the result in the context.Example: