前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何创建SAP Commerce Cloud Page Templates

如何创建SAP Commerce Cloud Page Templates

作者头像
Jerry Wang
发布2021-04-06 17:00:00
2360
发布2021-04-06 17:00:00
举报

Page Template

Step 1 - You would need to first create a PageTemplate, which define the layout for pages using the following fields below.

首先创建一个新的Page Template:

代码语言:javascript
复制
INSERT_UPDATE PageTemplate;$contentCV[unique=true];uid[unique=true];name;frontendTemplateName;restrictedPageTypes(code);active[default=true]
  • frontendTemplateName is used to define the JSP that shuold be used to render the page for pages with multiple layouts.
  • restrictedPageTypes is used to restrict templates to page types.

ContentSlotNames

Step 2 - Each PageTemplates can have multiple content slot names which helps with the positioning, where we can state a list of valid components for the slot.

Page Templates可以分配多个content slots. 每个slot包含多个Components.

There exists standard set of slots, such as SiteLogo, HeaderLinks MiniCart and NavigationBar, and a number of specific slots for each template.

有些slots是所有page共享的,比如SiteLogo,HeaderLinks,NavigationBar. 有的slot是某些页面特有的。

代码语言:javascript
复制
INSERT_UPDATE ContentSlotName;name[unique=true];template(uid,$contentCV)[unique=true][default='CategoryPage'];validComponentTypes(code);compTypeGroup(code)

Below the INSERT_UPDATE, we can see a number of content slot name available for the specific PageTemplate as specified in the statement default=‘CategoryPage’.

validComponentType or compTypeGroup defined the valid components for the slot.

ContentSlotForTemplate

Step 3 - We need to bind the content slots to page templates as it defines the relationship between team.

这一步,将Content Slot分配给template.

代码语言:javascript
复制
INSERT_UPDATE ContentSlotForTemplate;$contentCV[unique=true];uid[unique=true];position[unique=true];pageTemplate(uid,$contentCV)[unique=true][default='ProductDetailsPageTemplate'];contentSlot(uid,$contentCV)[unique=true];allowOverwrite

Create pages using the template

最后一步,基于之前创建的page template,创建一个新的page.

Step 4 - Finally, pages are created using the template

代码语言:javascript
复制
INSERT_UPDATE ContentPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);label;defaultPage[default='true'];approvalStatus(code)[default='approved'];homepage[default='false'];previewImage(code, $contentCV)[default='ContentPageModel__function_preview']

masterTemplate: By specifying the page template you have created, you can create a page.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021-03-12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Page Template
  • ContentSlotNames
  • ContentSlotForTemplate
  • Create pages using the template
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档