【问题标题】:Sitecore 8 EXM: Create Custom Email CampaignSitecore 8 EXM:创建自定义电子邮件活动
【发布时间】:2016-09-13 11:42:42
【问题描述】:

我是 Sitecore 的新手。我正在寻找为电子邮件活动创建自定义电子邮件模板。我正在使用带有 EXM 3.3 的 Sitecore 8.1。我一直在尝试实施以下演练:

Walkthrough: Building a custom message template

但是,当我使用新模板创建新的电子邮件营销活动时,我无法将组件分配给我的 aspx 页面上的各种占位符。我已经证明了我的 Sitecore 网站中的 aspx 文件是正确的文件,方法是在文件中添加纯 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 代码包含以下占位符键:

  • &lt;sc:Placeholder runat="server" Key="mn-title" /&gt;
  • &lt;sc:Placeholder runat="server" Key="mn-header" /&gt;
  • &lt;sc:Placeholder runat="server" Key="mn-content" /&gt;
  • &lt;sc:Placeholder runat="server" Key="mn-footer" /&gt;

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

我在这里错过了一些重要的事情吗?如何选择/选择可用于占位符的渲染?

演练包含五个需要完成的部分:

  1. 创建分支模板

您可以从以下屏幕截图中看到此部分配置正确:

  1. 创建模板

您可以从以下屏幕截图中看到此部分配置正确:

  1. 创建布局

您可以从以下屏幕截图中看到此部分配置正确:

  1. 绑定布局和消息模板

我很确定我已经成功完成了演练的前 3 个部分,但是当我尝试完成“绑定布局和消息模板”部分时,演练的第 5 点说:

在“控件”选项卡上,添加相关控件。至少添加以下两个控件:

  • 目标项目 - 在 /Renderings/Email 广告系列中。
  • 设置页面标题 - 在 /Renderings/Email 广告系列中。

但在这种情况下,我没有“目标项目”作为要添加的渲染,您可以从以下屏幕截图中看到:

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

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

您可以从以下屏幕截图中看到此部分配置正确:

任何想法我错过了什么或做错了什么?提前致谢!

【问题讨论】:

    标签: email templates sitecore sitecore8 sitecore-exm


    【解决方案1】:

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

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

    关于您的问题。

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

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

    希望这会有所帮助!

    来自 Sitecore 的新闻信样本:不存在目标项目。

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

    现在转到 根项 的演示详细信息,并将此数据源附加到渲染

    【讨论】:

    • 感谢 Mohit 的帮助。我还注意到我需要将我创建的组件添加到相关的占位符设置对象中,以使组件可用于在我的页面/电子邮件上呈现
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-09
    相关资源
    最近更新 更多