b2c-page-designer
БесплатноБез исполняемых скриптовНе проверенDefine Page Designer page types and component types with regions, attributes, and rendering scripts. Use this skill whenever the user needs to create a new…
от SalesforceCommerceCloud★ 58 звёзд на GitHubОб этом скилле
Page Designer Skill
This skill guides you through creating custom Page Designer page types and component types for Salesforce B2C Commerce.
Scope & grounding
This skill covers B2C Commerce Page Designer (dw.experience package) with version-agnostic patterns, JSON schema structures, and code examples. JSON schemas and Script API signatures shown are illustrative and may drift across platform versions. Before answering questions that name a framework/version, or before emitting code the user will run, confirm against the docs via docs_search/docs_read (MCP) or b2c docs search/b2c docs read (CLI). The B2C Commerce documentation is the canonical grounding source for Script API methods, attribute schema requirements, and version-specific behaviors not covered here.
Canonical docs:
dw.experience.PageMgr- rendering pages and regionsdw.experience.PageScriptContext- page script context APIdw.experience.ComponentScriptContext- component script context APIdw.experience.Page- page object methodsdw.experience.Component- component object methodsdw.experience.Region- region object methodsdw.experience.image.Image- image attribute typedw.experience- package overview
Overview
Page Designer allows merchants to create and manage content pages through a visual editor. Developers create:
- Page Types - Define page structures with regions
- Component Types - Reusable content blocks with configurable attributes
File Structure
Page Designer files are in the cartridge's experience directory:
/my-cartridge
/cartridge
/experience
/pages
homepage.json # Page type meta definition
homepage.js # Page type script
/components
banner.json # Component type meta definition
banner.js # Component type script
/templates
/default
/experience
/pages
homepage.isml # Page template
/components
banner.isml # Component template
Naming: The .json and .js files must have matching names. Use only alphanumeric or underscore in file names and in any subdirectory names under experience/pages or experience/components.
Component types in subfolders: You can put component meta and script in a subdirectory (e.g. experience/components/assets/). The component type ID is then the path with dots: assets.hero_image_block. The template path under templates/default/ must mirror that path (e.g. templates/default/experience/components/assets/hero_image_block.isml), and the script must call Template('experience/components/assets/hero_image_block') so the path matches. Stored ID is component.{component_type_id}; total length must not exceed 256 characters.
Page Types
Meta Definition (pages/homepage.json)
Illustrative JSON schema; confirm version-specific page type schema requirements with official platform documentation.
{
"name": "Home Page",
"description": "Landing page with hero and content regions",
"region_definitions": [
{
"id": "hero",
"name": "Hero Section",
"max_components": 1
},
{
"id": "content",
"name": "Main Content"
},
{
"id": "footer",
"name": "Footer Section",
"component_type_exclusions": [
{ "type_id": "video" }
]
}
]
}
Page Script (pages/homepage.js)
'use strict';
var Template = require('dw/util/Template');
var HashMap = require('dw/util/HashMap');
var PageRenderHelper = require('*/cartridge/experience/utilities/PageRenderHelper.js');
module.exports.render = function (context) {
var model = new HashMap();
var page = context.page;
model.page = page;
model.regions = PageRenderHelper.getRegionModelRegistry(page);
return new Template('experience/pages/homepage').render(model).text;
};
Page Template (templates/default/experience/pages/homepage.isml)
This follows SFRA's region-model pattern: the page script builds
pdict.regionswithPageRenderHelper.getRegionModelRegistry(page), and eachRegionModel.render()call delegates to the platform'sPageMgr.renderRegion()with SFRA's render settings.
<isdecorate template="common/layout/page">
<div class="homepage">
<div class="hero-region">
<isprint value="${pdict.regions.hero.render()}" encoding="off"/>
</div>
<div class="content-region">
<isprint value="${pdict.regions.content.render()}" encoding="off"/>
</div>
<div class="footer-region">
<isprint value="${pdict.regions.footer.render()}" encoding="off"/>
</div>
</div>
</isdecorat
Установить b2c-page-designer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл b2c-page-designer?
Define Page Designer page types and component types with regions, attributes, and rendering scripts. Use this skill whenever the user needs to create a new page or component type, configure regions with allowed component constraints, define attribute_definition_groups, debug why a component does not appear in the editor, or fix enum/color attribute pitfalls. Also use when building visual merchandising experiences -- even if they just say 'my component is missing from PD' or 'add a hero banner component'.
Как установить скилл b2c-page-designer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл b2c-page-designer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic