Render using custom template on preview

This commit is contained in:
Mike Jolley
2024-04-12 11:32:01 +01:00
parent 36ff27d927
commit 76f6e7cdbd
2 changed files with 29 additions and 18 deletions

View File

@@ -51,8 +51,7 @@ class Renderer {
$templateStyles = file_get_contents(dirname(__FILE__) . '/' . self::TEMPLATE_STYLES_FILE);
$templateStyles = apply_filters('mailpoet_email_renderer_styles', $templateStyles, $post);
// @todo use custom template to render.
$templateHtml = $this->contentRenderer->render($post, $this->templates->getBlockTemplateFromFile('email-general.html'));
$templateHtml = $this->contentRenderer->render($post, $this->templates->getBlockTemplate('mailpoet/mailpoet//email-general'));
ob_start();
include self::TEMPLATE_FILE;