In this post I will extend the basic e-mail template for Sitecore ECM with a title and text listing. With this e-mail template the business user can create new Title and Text items within the page-editor (Sitecore 6.4 and higher) or the content-editor (all versions of Sitecore). This article is a follow-up article of the Sitecore ECM: How to create a Email template from Scratch – Part I.
Create the Newsletter Text template
Createa template Newsletter Text with the following fields: Message Title and Message Text.
Add standard values for the Message Title and Message Text fields.
Add Newsletter Text folder to the Branche Template
Go to the BasicNewletter branche template and create a folder Newsletter Text. Assign the Newsletter Text template as Insert option.
Create Newsletter Text rendering
Create a new layout called Newsletter Text and copythe following code.
In this post I will create a e-mail template for ECM from scratch. This article is based on a Webinar (in Dutch) I did about the Email Campaign Manager (ECM) you can see the Webinar on YouTube.
[youtube]hGmzaK79cvI[/youtube]
We build a custom template the same way that we build a page. First we will create the templates, than we will create the presentation components and at the end we will bind the presentation components to the template standard values. Let’s start building!
Create Basic Newsletter template
1. Open the template manager and create a new template called Basic Newsletter, Select the following base templates
/sitecore/templates/Modules/Email Campaign/Messages/Inner Content/Message Root
2. Specify the following fields :
a. Title
b. Text, set the source property to /sitecore/system/Settings/Html Editor Profiles/ Message Content
c. Header Text
d. Header Link Text
e. Footer Text
The Basic Newsletter template in will look like this:
1. Create a branch template
2. Select the /sitecore/templates/Modules/Email Campaign/Messages/Pre-existing page template
3. Rename the create Pre-exiting Page branche template to Basic NewsLetter
4. Underneath the $name item create the Email Message root item based on the Basic newsletter template
5. Underneath the created Email Message root item insert a folder called Message Subjects. This folder will contain all subjects for the e-mail.
6. Remove the folder template to insert options of the Message Subject folder and add the Subject template: /sitecore/templates/Modules/Email Campaign/Messages/Inner Content/Newsletter/Subject.
7. Insert a Subject item in the Message Subject folder with the name Subject 1.