// Set template instance
$mailerInstance->setTemplateInstance($templateInstance);
- // Set application instance
- $mailerInstance->setApplicationInstance($applicationInstance);
-
// Set template name
$mailerInstance->setTemplateName($templateName);
$templateInstance->compileTemplate();
$templateInstance->assignTemplateWithVariable('footer', 'footer');
+ // Get master template name
+ $masterTemplateName = GenericRegistry::getRegistry()->getInstance('application')->buildMasterTemplateName();
+
// Load the master template
- $templateInstance->loadCodeTemplate(GenericRegistry::getRegistry()->getInstance('application')->buildMasterTemplateName());
+ $templateInstance->loadCodeTemplate($masterTemplateName);
// Then compile it again
$templateInstance->compileVariables();