Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Email->populateTemplate() with multiple objects


2 Posts   1477 Views


28 October 2007 at 10:10pm Community Member, 501 Posts

How can I do Email->populateTemplate() with multiple objects?
In the docu
it says we can call it multiple times, but how does the template discern different variables?

Suppose I have


where both $pageAuthor and $comment have a $Username variable.

How can I let the emailtemplate know when to use what?
I suppose <% control %> wouldn't work?


28 October 2007 at 11:31pm Community Member, 501 Posts

A possible solution: just collect the vars you want in a new Array with different names and populate the template with that array.