I need to pass the following to the included template via the Django include tag:
{% include 'btn.html' with btn_text='Hi '|add:first_name|add:' - Verify Email Now' btn_url=verify_url %}
Therefore, I can parse the whole question in two parts:
a. Is it possible to add first_name to a string in a different, more elegant style at the template level?
Q. I need the string to be translated at the template level - is this possible?
those. what I intend to do (but not syntactically correctly) is given below:
{% include 'btn.html' with btn_text= {% blocktrans first_name as first_name %} Hi {{first_name}} - Verify Email Now {% endblocktrans %} btn_url=verify_url %}
source share