Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Email template within an email template View modes: 
User avatar
Member
Member
Gais - 2/18/2011 4:39:00 AM
   
Email template within an email template
I want to use an email template within my current Kentico project as a base template for selected other email templates, so that selected emails have the same look and feel.

For example the Base template contains

<html>
<body>
<h1>Header</h1>
{# placeholder #}
</body>
</html>


Then in other templates, ideally I could check a check box in the Site Manager to use the base template, which would then insert the contents of the current template in to the placeholder in the base template.

Is there a way of achieving this in Kentico?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 2/21/2011 4:08:57 AM
   
RE:Email template within an email template
Hello,

Regrettably, there is no native support for this szenario. However, you can implement a custom macro, which you then can place into your "global" template, which would resolve into the second e-mail template.

You would get the second template with our API and resolve all the macros within. To access the template you can use the following method:

CMS.EmailEngine.EmailTemplateProvider.GetEmailTemplate(String, Int32)

Best regards,
Boris Pocatko