使用Adobe Campaign表单组件创建自定义AEM页面模板

本页介绍如何通过检查如何实现Geometrixx-户外模板(/apps/geometrixx-outdoors/components/page_campaign_profile)来构建使用Adobe Campaign表单组件的自定义页面模板,并指出创建自己的自定义模板时可能需要的重要信息。

注意

电子邮件和表单范例仅在Geometrixx中提供。请从“包共享”中下载 Geometrixx 示例内容。

要使用Adobe Campaign表单组件创建自定义AEM页面模板,请确保您具有以下各项:

  1. 更正resourceSuperType

    确保page-component从mcm/campaign/components/profile继承。

    这是Servlet获取和保存信息所必需的

    • com.day.cq.mcm.campaign.servlets.TemplateListServlet
    • com.day.cq.mcm.campaign.servlets.SaveProfileServlet

    chlimage_1-201

  2. ClientContext设置

    当您查看clientcontext设置(/etc/designs/geometrixx-outdoors/jcr:content/page_campaign_profile)时,您会看到以下设置:

    • ClientContext指向/etc/clientcontext/campaign
    • 还有额外的​config​节点。

    chlimage_1-202

  3. head.jsp(/apps/geometrixx-outdoors/components/page_campaign_profile/head.jsp?lang=zh-Hans)

    在​head.jsp​中,您将看到以下使用​clientcontext-config​和​cloudservice-hook​的行:

    <cq:include path="config" resourceType="cq/personalization/components/clientcontext_optimized/config"/>
    <sling:include path="contexthub" resourceType="granite/contexthub/components/contexthub"/>
    <cq:include script="/libs/cq/cloudserviceconfigs/components/servicelibs/servicelibs.jsp?lang=zh-Hans"/>
    
  4. body.jsp(/apps/geometrixx-outdoors/components/page_campaign_profile/body.jsp?lang=zh-Hans)

    在​body.jsp​中,云服务加载到页面底部:

    <cq:include path="cloudservices" resourceType="cq/cloudserviceconfigs/components/servicecomponents"/>
    
  5. 活动页面属性

    要能够选择Adobe Campaign模板,请使用​活动​选项卡扩展page-properties:

    /apps/geometrixx-outdoors/components/page_campaign_profile/dialog/items/tabs/items/campaign

    chlimage_1-203

  6. 模板设置

    在模板(/apps/geometrixx-outdoors/templates/campaign_profile/jcr:content)中,您会看到以下默认值:

    acMapping mapRecipient(对于Adobe Campaign6.1),用户档案(对于Adobe Campaign Standard)
    acTemplateId 邮件

    chlimage_1-204

On this page

Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now