{"id":354663,"date":"2022-10-11T14:39:48","date_gmt":"2022-10-11T14:39:48","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=354663"},"modified":"2024-05-07T11:41:06","modified_gmt":"2024-05-07T11:41:06","slug":"how-to-add-email-layouts-in-a-theme-from-an-external-module","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/","title":{"rendered":"How to add email layouts in a theme from an external module"},"content":{"rendered":"\n<p>In this blog, we are about to learn, how to add email layouts in a theme from an external module.<\/p>\n\n\n\n<p>Each time we install a language or if we generate them via the back office our layout will be rendered, translated, and exported in the appropriate folders.<\/p>\n\n\n\n<p>Let\u2019s assume for this example we want to add our layout for both themes&nbsp;modern&nbsp;and&nbsp;classic. Then we have to prepare our layouts. <\/p>\n\n\n\n<p>Let\u2019s start,<\/p>\n\n\n\n<p>We store them in the&nbsp;<code><strong>mail\/layouts<\/strong><\/code>&nbsp;folder of our module.<\/p>\n\n\n\n<p><strong>our_module_name\/<code>mail\/layouts<\/code>\/custom_classic_webkul_layout.html.twig<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{# modules\/WkTestModule\/mails\/layout\/custom_classic_webkul_layout.html.twig #}\n\n{# You can use the theme layout (if present) to extend it easily #}\n{% extends &#039;@MailThemes\/classic\/components\/layout.html.twig&#039; %}\n\n{% block content %}\n&lt;tr&gt;\n  &lt;td align=&quot;center&quot; class=&quot;titleblock&quot;&gt;\n    &lt;font size=&quot;2&quot; face=&quot;{{ languageDefaultFont }}Open-sans, sans-serif&quot; color=&quot;#555454&quot;&gt;\n      &lt;span\n        class=&quot;title&quot;&gt;{{ &#039;This is an example mail template created by webkul from my module for classic theme&#039;|trans({},\n        &#039;EmailsBody&#039;, locale)|raw }}&lt;\/span&gt;\n    &lt;\/font&gt;\n  &lt;\/td&gt;\n&lt;\/tr&gt;\n&lt;tr&gt;\n  &lt;td class=&quot;space_footer&quot;&gt;&amp;nbsp;&lt;\/td&gt;\n&lt;\/tr&gt;\n{% endblock %}\n{% block footer %}\n&lt;tr&gt;\n  &lt;td class=&quot;space_footer&quot;&gt;&amp;nbsp;&lt;\/td&gt;\n&lt;\/tr&gt;\n&lt;tr&gt;\n  &lt;td class=&quot;footer&quot; style=&quot;border-top: 4px solid #333333&quot;&gt;\n    &lt;span&gt;{{ &#039;&lt;a href=&quot;{shop_url}&quot;&gt;{shop_name}&lt;\/a&gt; created by &lt;a\n        href=&quot;https:\/\/webkul.com\/&quot;&gt;Webkul&lt;\/a&gt;&#039;|trans({&#039;{prestashop_url}&#039;:\n      &#039;https:\/\/www.prestashop.com\/?utm_source=marchandprestashop&amp;utm_medium=e-mail&amp;utm_campaign=footer_1-7&#039;},\n      &#039;Emails.Body&#039;, locale)|raw }}&lt;\/span&gt;\n  &lt;\/td&gt;\n&lt;\/tr&gt;\n{% endblock footer %}<\/pre>\n\n\n\n<p><strong>our_module_name\/<code>mail\/layouts<\/code>\/custom_modern_webkul_layout.html.twig<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{# modules\/WkTestModule\/mails\/layout\/custom_modern_webkul_layout.html.twig #}\n{% extends &#039;@MailThemes\/modern\/components\/layout.html.twig&#039; %}\n\n{% block content %}\n&lt;tr&gt;\n  &lt;td align=&quot;center&quot; class=&quot;titleblock&quot;&gt;\n    &lt;font size=&quot;2&quot; face=&quot;{{ languageDefaultFont }}Open-sans, sans-serif&quot; color=&quot;#555454&quot;&gt;\n      &lt;span\n        class=&quot;title&quot;&gt;{{ &#039;This is an example mail template created by webkul from my module for modern theme&#039;|trans({},\n        &#039;EmailsBody&#039;, locale)|raw }}&lt;\/span&gt;\n    &lt;\/font&gt;\n  &lt;\/td&gt;\n&lt;\/tr&gt;\n&lt;tr&gt;\n  &lt;td class=&quot;space_footer&quot;&gt;&amp;nbsp;&lt;\/td&gt;\n&lt;\/tr&gt;\n{% endblock %}\n{% block footer %}\n&lt;tr&gt;\n  &lt;td class=&quot;space_footer&quot;&gt;&amp;nbsp;&lt;\/td&gt;\n&lt;\/tr&gt;\n&lt;tr&gt;\n  &lt;td class=&quot;footer&quot; style=&quot;border-top: 4px solid #333333&quot;&gt;\n    &lt;span&gt;{{ &#039;&lt;a href=&quot;{shop_url}&quot;&gt;{shop_name}&lt;\/a&gt; created by &lt;a\n        href=&quot;https:\/\/webkul.com\/&quot;&gt;Webkul&lt;\/a&gt;&#039;|trans({&#039;{prestashop_url}&#039;:\n      &#039;https:\/\/www.prestashop.com\/?utm_source=marchandprestashop&amp;utm_medium=e-mail&amp;utm_campaign=footer_1-7&#039;},\n      &#039;Emails.Body&#039;, locale)|raw }}&lt;\/span&gt;\n  &lt;\/td&gt;\n&lt;\/tr&gt;\n{% endblock footer %}<\/pre>\n\n\n\n<p>Now we will register a new hook named <strong>&#8220;actionListMailThemes&#8221;<\/strong>. It is used to add a new layout to our theme&#8217;s layout collection.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nuse PrestaShop\\PrestaShop\\Core\\MailTemplate\\Layout\\Layout;\nuse PrestaShop\\PrestaShop\\Core\\MailTemplate\\ThemeCatalogInterface;\nuse PrestaShop\\PrestaShop\\Core\\MailTemplate\\ThemeCollectionInterface;\nuse PrestaShop\\PrestaShop\\Core\\MailTemplate\\ThemeInterface;\n\nclass WkTestModule extends Module \n{\n    public function __construct()\n\t{\n\t\t$this-&gt;name = &#039;wktestmodule&#039;;\n\t\t$this-&gt;tab = &#039;front_office_features&#039;;\n\t\t$this-&gt;version = &#039;4.0.0&#039;;\n\t\t$this-&gt;author = &#039;Webkul&#039;;\n\t\t$this-&gt;need_instance = 0;\n\t\tparent::__construct();\n\t\t$this-&gt;bootstrap = true;\n\t\t$this-&gt;secure_key = Tools::encrypt($this-&gt;name);\n\t\t$this-&gt;displayName = $this-&gt;l(&#039;Wk Test Module&#039;);\n\t\t$this-&gt;description = $this-&gt;l(&#039;Wk Test Module&#039;);\n\t\t$this-&gt;confirmUninstall = $this-&gt;l(&#039;Are you sure you want to uninstall this module?&#039;);\n\t\t$this-&gt;ps_versions_compliancy = array(\n\t\t\t&#039;min&#039; =&gt; &#039;1.7&#039;,\n\t\t\t&#039;max&#039; =&gt; _PS_VERSION_\n\t\t);\n\t}\n    \n    public function install() \n    {\n        return parent::install()\n            \/\/ This class constant contains &#039;actionBuildMailLayoutVariables&#039;\n            &amp;&amp; $this-&gt;registerHook(ThemeCatalogInterface::LIST_MAIL_THEMES_HOOK)\n        ;\n    }\n    \n    public function uninstall() \n    {\n        return parent::uninstall()\n            &amp;&amp; $this-&gt;unregisterHook(ThemeCatalogInterface::LIST_MAIL_THEMES_HOOK)\n        ;        \n    }\n    \n    public function enable($force_all = false) \n    {\n        return parent::enable()\n            &amp;&amp; $this-&gt;registerHook(ThemeCatalogInterface::LIST_MAIL_THEMES_HOOK)\n        ;\n    }\n    \n    public function disable($force_all = false) \n    {\n        return parent::disable()\n            &amp;&amp; $this-&gt;unregisterHook(ThemeCatalogInterface::LIST_MAIL_THEMES_HOOK)\n        ;        \n    }\n    \n    \/**\n     * @param array $hookParams\n     *\/\n    public function hookActionListMailThemes(array $hookParams)\n    {\n        if (!isset($hookParams&#091;&#039;mailThemes&#039;])) {\n            return;\n        }\n\n        \/** @var ThemeCollectionInterface $themes *\/\n        $themes = $hookParams&#091;&#039;mailThemes&#039;];\n\n        \/** @var ThemeInterface $theme *\/\n        foreach ($themes as $theme) {\n            if (!in_array($theme-&gt;getName(), &#091;&#039;classic&#039;, &#039;modern&#039;])) {\n                continue;\n            }\n\n            \/\/ Add a layout to each theme (don&#039;t forget to specify the module name)\n            $theme-&gt;getLayouts()-&gt;add(new Layout(\n                &#039;custom_template&#039;,\n                __DIR__ . &#039;\/mails\/layouts\/custom_&#039; . $theme-&gt;getName() . &#039;_webkul_layout.html.twig&#039;,\n                &#039;&#039;,\n                $this-&gt;name\n            ));\n        }\n    }\n}<\/pre>\n\n\n\n<p>Now we will get result like this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"554\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png\" alt=\"design-preview\" class=\"wp-image-354664\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-300x139.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-250x115.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-768x355.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview.png 1280w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"908\" height=\"329\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Email-html-content.png\" alt=\"Email-html-content\" class=\"wp-image-354666\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Email-html-content.png 908w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Email-html-content-300x109.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Email-html-content-250x91.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/Email-html-content-768x278.png 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>We can also use the constant name actionListMailThemes instead of ThemeCatalogInterface::LIST_MAIL_THEMES_HOOK.<\/p>\n\n\n\n<p>That\u2019s all about this blog.<\/p>\n\n\n\n<p>If any issues or doubts in the above step, please feel free to let us know in the comment section.<\/p>\n\n\n\n<p>We would be happy to help.<\/p>\n\n\n\n<p>You can learn&nbsp;<a href=\"https:\/\/webkul.com\/blog\/how-to-extend-an-email-layout-in-a-theme-from-a-module\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to extend an email layout in a theme from a module<\/a>.<\/p>\n\n\n\n<p>You can also explore our&nbsp;<a href=\"https:\/\/webkul.com\/prestashop-development\/\">PrestaShop Development Services<\/a>&nbsp;and a large range of quality&nbsp;<a href=\"https:\/\/store.webkul.com\/PrestaShop-Extensions.html\">PrestaShop Modules<\/a>.<\/p>\n\n\n\n<p>For any doubt contact us at&nbsp;<a href=\"mailto:support@webkul.com\">support@webkul.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we are about to learn, how to add email layouts in a theme from an external module. Each time we install a language or if we generate them via the back office our layout will be rendered, translated, and exported in the appropriate folders. Let\u2019s assume for this example we want to <a href=\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":434,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[209,1],"tags":[],"class_list":["post-354663","post","type-post","status-publish","format-standard","hentry","category-prestashop","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to add email layouts in a theme from an external module<\/title>\n<meta name=\"description\" content=\"We can add our own email layouts from our installed module, it will then be included during email generation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add email layouts in a theme from an external module\" \/>\n<meta property=\"og:description\" content=\"We can add our own email layouts from our installed module, it will then be included during email generation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-11T14:39:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-07T11:41:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png\" \/>\n<meta name=\"author\" content=\"Ravindra Gautam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ravindra Gautam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\"},\"author\":{\"name\":\"Ravindra Gautam\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/1a45b107e54bb2991c05f20fbb1dae12\"},\"headline\":\"How to add email layouts in a theme from an external module\",\"datePublished\":\"2022-10-11T14:39:48+00:00\",\"dateModified\":\"2024-05-07T11:41:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\"},\"wordCount\":240,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png\",\"articleSection\":[\"prestashop\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\",\"name\":\"How to add email layouts in a theme from an external module\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png\",\"datePublished\":\"2022-10-11T14:39:48+00:00\",\"dateModified\":\"2024-05-07T11:41:06+00:00\",\"description\":\"We can add our own email layouts from our installed module, it will then be included during email generation.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview.png\",\"width\":1280,\"height\":591,\"caption\":\"design-preview\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to add email layouts in a theme from an external module\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/1a45b107e54bb2991c05f20fbb1dae12\",\"name\":\"Ravindra Gautam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b8439e2774cf21a264df535ff994154071e538a17da7dc76beb9f7ffa28fa19?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b8439e2774cf21a264df535ff994154071e538a17da7dc76beb9f7ffa28fa19?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ravindra Gautam\"},\"description\":\"Ravindra is a Software Engineer in PrestaShop platform with expertise in Marketplace Development services. He excels in creating and managing online stores using PrestaShop, leveraging his skills in JavaScript, jQuery, and Web Services to deliver dynamic, user-friendly e-commerce solutions that drive business success.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/ravindra-gautam192\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add email layouts in a theme from an external module","description":"We can add our own email layouts from our installed module, it will then be included during email generation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/","og_locale":"en_US","og_type":"article","og_title":"How to add email layouts in a theme from an external module","og_description":"We can add our own email layouts from our installed module, it will then be included during email generation.","og_url":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-10-11T14:39:48+00:00","article_modified_time":"2024-05-07T11:41:06+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png","type":"","width":"","height":""}],"author":"Ravindra Gautam","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ravindra Gautam","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/"},"author":{"name":"Ravindra Gautam","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/1a45b107e54bb2991c05f20fbb1dae12"},"headline":"How to add email layouts in a theme from an external module","datePublished":"2022-10-11T14:39:48+00:00","dateModified":"2024-05-07T11:41:06+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/"},"wordCount":240,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png","articleSection":["prestashop"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/","url":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/","name":"How to add email layouts in a theme from an external module","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview-1200x554.png","datePublished":"2022-10-11T14:39:48+00:00","dateModified":"2024-05-07T11:41:06+00:00","description":"We can add our own email layouts from our installed module, it will then be included during email generation.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2022\/10\/design-preview.png","width":1280,"height":591,"caption":"design-preview"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-add-email-layouts-in-a-theme-from-an-external-module\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to add email layouts in a theme from an external module"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/1a45b107e54bb2991c05f20fbb1dae12","name":"Ravindra Gautam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b8439e2774cf21a264df535ff994154071e538a17da7dc76beb9f7ffa28fa19?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b8439e2774cf21a264df535ff994154071e538a17da7dc76beb9f7ffa28fa19?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ravindra Gautam"},"description":"Ravindra is a Software Engineer in PrestaShop platform with expertise in Marketplace Development services. He excels in creating and managing online stores using PrestaShop, leveraging his skills in JavaScript, jQuery, and Web Services to deliver dynamic, user-friendly e-commerce solutions that drive business success.","url":"https:\/\/webkul.com\/blog\/author\/ravindra-gautam192\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/354663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/434"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=354663"}],"version-history":[{"count":14,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/354663\/revisions"}],"predecessor-version":[{"id":439311,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/354663\/revisions\/439311"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=354663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=354663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=354663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}