I am using Simple HTML Message as the Template to create my email. Layout is Text Message Layout. It is not allowing to add components, Images or internal Links.

This could be an issue of layout, if I only want to create a new Layout for email, so that the rendering and images and internal links can be added, How do I achieve that.

Can anyone provide a sample cshtml for the layout.


1 Answer 1


Creating a Layout for EXM is not much different from creating the layout for your normal Sitecore item, To create the layout of your message template:

Step 1: Create Layout in Sitecore

  • In the Content Editor, navigate to /sitecore/Layout/Layouts/System/Email/ and insert a new layout, for example, NewsletterLayout.

enter image description here

Notice, we have passed the view layout path, that we will create in step 2.

Step 2: Create Layout view file in solution

  • Now in your solution, create a razor view file eg. NewsletterLayout.cshtml,
@using Sitecore.Mvc
@using Sitecore.Mvc.Presentation

@model RenderingModel
<html style="opacity: 1;" xmlns="http://www.w3.org/1999/xhtml">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content=" width=device-width, initial-scale=1, maximum-scale=1" name="viewport" />
    <meta content="IE=edge" http-equiv="X-UA-Compatible" />
    <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%">
                <td align="center">


Step 3: Branch Templates and Data Templates in Sitecore

  • Now you need to create a new branch template or you can duplicate the existing ones from this path: Templates/Branches/System/Email/Messages

enter image description here

  • Assign your custom layout on Message Root. enter image description here

  • Create a new data template at Templates/System/Email/Messages/Inner Content and add the required field to this template.

enter image description here

Refer to this blog for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.