Forum Discussion
Hi lilim,
what does "testing" in your case mean? If you use the send a test email from the template editor view in studio, you will always get a random board for the ${coreNode.title} context object. I think this happens while the studio does not have any context, like boards, categories etc. Usually the "trigger" of the mail is a board object which has a board context.
Using the coreNode object for your use case seems not correct, because the coreNode object is always replaced with current active node. For example if you working on board level (e.g. on board "LabVIEW Add-Ons") the ${coreNode.title} object will return "LabVIEW Add-Ons".
Maybe you could use something like
${coreNode.ancestors}
to show the parent of the board in your mail template. Check the freemarker context objects for more information.
I'm not sure if the ancestors property could be used within mail templates.
Regards,
Christian
Thanks for the reply, Christian. Yes, I was testing by sending the test email to myself from Studio. I see now what you are saying -- I'm always returning the most recently active board when doing this test. Email notifications from stage aren't working anymore, otherwise I could test this properly. It's possible that ${coreNode.title} is correct when the email template has some context to work with.
I did try adding ${coreNode.ancestors} to the template, and the result returned:
[lithium.eval.velocity.CoreNodeTemplateModel@a54cc6b8,
lithium.eval.velocity.CoreNodeTemplateModel@e490cafc,
lithium.eval.velocity.CoreNodeTemplateModel@76850eb6]
:catsurprised:
I assume this occurred because that's a FreeMarker context object, and only Velocity context objects should be used in email templates.
Thanks,
Lili
Related Content
- 2 years ago
- 2 years ago
- 5 years ago