Can you add tokens to the email template with different objects?

0
I am using the email module with templates and I am attempting to make the email dynamic using tokens however, when I try to use more than one different type of object i receive the error below. Does anyone know of a way to add tokens of differing object types?Thank you.
asked
1 answers
3

Hi Sophie,

You can use your objects associations to create tokens from other tables. When creating a token, set your token type to association and you will be able to see all of the associations you have access too. 

If your domain model does not allow you to access everything you need, what I usually do is create a non-persistent entity with associations to all of the tables that I want to use in my email template and then use that as the object in my email template. 

Hope this helps!

answered