marketplace-add-extension

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Add an Extension Point Route

添加扩展点路由

You are helping the user add a new extension point to their Sitecore Marketplace app.
你正在协助用户为其Sitecore Marketplace应用添加新的扩展点。

Step 1: Determine Extension Type

步骤1:确定扩展类型

Ask the user which type (or infer from $ARGUMENTS):
TypeSlugDescriptionTypical Size
Custom Field
custom-field
Inline field in content editor~300px wide
Dashboard Widget
dashboard-widget
Widget on the dashboard~400x300px
Pages Context Panel
pages-context-panel
Side panel in Pages editor~350px wide, full height
Fullscreen
fullscreen
Full-page within Sitecore shellFull viewport
Standalone
standalone
Independent pageFull viewport
询问用户所需的扩展类型(或从$ARGUMENTS中推断):
类型Slug描述典型尺寸
自定义字段
custom-field
内容编辑器中的内嵌字段宽约300px
仪表盘Widget
dashboard-widget
仪表盘上的组件约400x300px
页面上下文面板
pages-context-panel
页面编辑器中的侧边面板宽约350px,全屏高
全屏
fullscreen
Sitecore shell内的全页面完整视口
独立页面
standalone
独立的页面完整视口

Step 2: Generate the Route

步骤2:生成路由

Create the route at
app/<extension-type>/page.tsx
(or a custom path the user prefers).
See extension-types.md for complete boilerplate templates for each extension type.
app/<extension-type>/page.tsx
路径下创建路由(或用户偏好的自定义路径)。
查看extension-types.md获取每种扩展类型的完整样板模板。

Step 3: Register in Developer Portal

步骤3:在开发者门户注册

Remind the user to register the extension point in the Sitecore Developer Portal:
  1. Go to Developer Portal → Your App → Extension Points
  2. Click "Add Extension Point"
  3. Select the type and set the route path (e.g.,
    /custom-field
    )
提醒用户在Sitecore Developer Portal中注册该扩展点:
  1. 进入开发者门户 → 你的应用 → 扩展点
  2. 点击「添加扩展点」
  3. 选择类型并设置路由路径(例如
    /custom-field

Step 4: Suggest Next Steps

步骤4:后续操作建议

  • Use
    /marketplace-build-component
    to build out the UI
  • Use
    /marketplace-sdk-reference
    to look up available queries/mutations for this extension type
  • Use
    /marketplace-add-xmc
    if the extension needs XM Cloud data
  • 使用
    /marketplace-build-component
    构建UI
  • 使用
    /marketplace-sdk-reference
    查询该扩展类型可用的queries/mutations
  • 如果扩展需要XM Cloud数据,使用
    /marketplace-add-xmc

Reference Files

参考文件

  • Extension Types — Boilerplate templates for each extension type
  • 扩展类型 — 各类扩展类型的样板模板