gpt4 book ai didi

email - 站点核心 8 EXM : Create Custom Email Campaign

转载 作者:行者123 更新时间:2023-12-01 08:52:03 27 4
gpt4 key购买 nike

我是 Sitecore 的新手。我希望为电子邮件事件创建自定义电子邮件模板。我将 Sitecore 8.1 与 EXM 3.3 结合使用。我一直在尝试实现以下演练:

Walkthrough: Building a custom message template

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

Edit Email Template

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

<%@ 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 代码包含以下占位符键:

  • <sc:Placeholder runat="server" Key="mn-title" />
  • <sc:Placeholder runat="server" Key="mn-header" />
  • <sc:Placeholder runat="server" Key="mn-content" />
  • <sc:Placeholder runat="server" Key="mn-footer" />

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

SelectRendering

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

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

  1. 创建分支模板

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

CreateBranchTemplate

  1. 创建模板

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

CreateTemplate

  1. 创建布局

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

CreateTheLayout

  1. 绑定(bind)布局和消息模板

我很确定我已经设法正确完成演练的前 3 个部分,但是当我尝试完成“绑定(bind)布局和消息模板”部分时,演练的第 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.

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

SelectARendering

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

DeviceEditorControls

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

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

MakeMessageAvailableInEXM

有什么我遗漏或做错的想法吗?提前致谢!

最佳答案

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

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

关于您的问题。

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

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

希望这对您有所帮助!

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

Sample News Letter

带有数据源的时事通讯项目 enter image description here

现在转到 Root item 的演示详细信息并将此数据源附加到效果图 enter image description here

关于email - 站点核心 8 EXM : Create Custom Email Campaign,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39469176/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com