Sitecore 8 EXM:创建自定义电子邮件活动

Sitecore 8 EXM: Create Custom Email Campaign

我是 Sitecore 的新手。我希望为电子邮件活动创建自定义电子邮件模板。我将 Sitecore 8.1 与 EXM 3.3 一起使用。我一直在尝试实现以下 walk-through:

Walkthrough: Building a custom message template

但是,当我使用新模板创建新的电子邮件活动时,我无法将组件分配给 aspx 页面上的各种占位符。我已经证明 aspx 文件是我的 Sitecore 网站中的正确文件,方法是向文件中添加普通 html 并查看结果显示在 EXM 应用程序消息选项卡的正文部分中,正如您从以下屏幕截图。

下面是我的电子邮件模板的代码:

<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>
<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Analytics" %>
<%@ OutputCache Location="None" VaryByParam="none" %>
<html>
    <head>
        <title>
            <!-- Used for storing title of the email -->
            <sc:Placeholder runat="server" Key="mn-title"/>
        </title>
        <!-- The VisitorIdentification control ensures that people viewing this page
        with a traditional web browser will be classified as humans not bots.
        This control is not required if people only view messages using Email clients -->
        <sc:VisitorIdentification runat="server" />
    </head>
    <body style="background-color:gold">
        <label>test html label added here!</label>
        <form method="post" runat="server" id="mainform">
            <table style="width:100%">
                <tr>
                    <td colspan="2" style="background-color:blue;color:green;width:100%">
                        <!-- Used for storing the title of the newsletter in h1 -->
                        <sc:Placeholder runat="server" Key="mn-header" />
                    </td>
                </tr>
                <tr>
                    <td style="background-color:white;color:black;width:100%">
                        <!-- Used for storing the content blocks of the newsletter in h2 and paragraphs -->
                        <sc:Placeholder runat="server" Key="mn-content" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="background-color:blue;color:green;width:100%">
                        <!-- Used for storing the footer e.g. the unsubscribe link -->
                        <sc:Placeholder runat="server" Key="mn-footer" />
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>

html 代码包含以下占位符键:

在 EXM 中转到我的电子邮件的“消息”选项卡并选择“添加组件”按钮时,我在页面上看到了 "Add Here" 按钮,但无法选择任何适合 mn-header 的效果图和 mn-footer 个组件。 mn-content 允许我从几个预定义的渲染中进行选择,如下面的屏幕截图所示:

我是不是漏掉了什么重要的东西?我怎样才能 select/choose 我的占位符可以使用哪些效果图?

Walk-through 包含五个需要完成的部分:

  1. 创建分支模板

您可以从以下屏幕截图中看出该部分已正确配置:

  1. 创建模板

您可以从以下屏幕截图中看出该部分已正确配置:

  1. 创建布局

您可以从以下屏幕截图中看出该部分已正确配置:

  1. 绑定布局和消息模板

我很确定我已经成功完成了 walk-through 的前 3 个部分,但是当我尝试完成 "Bind the Layout and the message template" 部分时,[=113= 的第 5 点] 说:

On the Controls tab, add the relevant controls. As a minimum add the following two controls:

  • Target Item – in /Renderings/Email Campaign.
  • Set Page Title – in /Renderings/Email Campaign.

但是我没有 "Target Item" 作为渲染添加到这种情况下,您可以从以下屏幕截图中看到:

所以我在设备编辑器中添加了可用渲染中的以下组件,如以下屏幕截图所示:

  1. 使您的模板在 EXM 中可用

您可以从以下屏幕截图中看出该部分已正确配置:

知道我遗漏了什么或做错了什么吗?提前致谢!

我认为创建自定义模板的文档尚未针对 Sitecore EXM 3.3 进行更新。

我认为不再需要设置目标项目了。我已经安装了示例通讯包,但我没有找到它。

关于你的问题。

您需要创建数据源项并将其分配给控件的数据源属性。

我建议您安装示例时事通讯包(默认 exm 模块包附带)并在消息根项上查看它的结构和表示详细信息。我附上了我创建的那个。 对于您的场景,您需要使用“custom newsletter ll content”模板在消息根目录下创建项目,并将该项目指定为显示正文控件的数据源。

希望对您有所帮助!

来自 Sitecore 的新闻信函示例:不存在目标项目。

带有数据源的时事通讯项目

现在转到 根项目 的演示详细信息并将此数据源附加到效果图