45
46
For example, create a template template
56
58
Then in your template you write
64
66
And it will be evaluated to
78
80
Given the way evaluation works internally (body_text of the template template is evaluated two times, first with the instance of email.template of your own template, then with the object your template refers to), you can do some trickery if you know that a template template is always used with the same kind of model (that is, models that have the same field name):
80
82
In your template template:
83
Dear ${'${object.name}'}, <-- gets evaluated to "${object.name}" in the first step, then to the content of object.name
86
Dear ${'${object.name}'}, <-- gets evaluated to "${object.name}" in the first step, then to the content of object.name
88
91
'website': 'http://therp.nl',
90
93
'depends': ['email_template'],