Q:

How to pass a parameter to the template I'm extending, and use it inside a template?

I'm using a master template for all our emails. I would like this master template to use an ID field that is passed along from the concrete template:
some-email.html
#{set 'emailId'}1{/set}
#{extends 'app/views/Mails/mail-main.html' /}
...

mail-main.html (this is the master template)
// Here, I would like to use the emailId parameter inside another template.
// Specifically, a link I'm rendering
<a href="@@{Foo.bar(emailId)}`>Link text</a>

But, if I understand correctly, that's not how the set and get template works - they only allow me to embed the object in the template text in the template that uses get, not to pass it along to other templates.
Is there a simple way to do what I seek?

A:

You can just write the following, in mail-main.html:
<a href="@@Foo.bar(get('emailId'))">Link text</a>

