@salesforce/afv-skills 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/skills/building-ui-bundle-app/SKILL.md +2 -2
- package/skills/generating-experience-lwr-site/SKILL.md +0 -243
- package/skills/generating-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +0 -279
- package/skills/generating-experience-lwr-site/docs/configure-content-brandingSet.md +0 -141
- package/skills/generating-experience-lwr-site/docs/configure-content-route.md +0 -232
- package/skills/generating-experience-lwr-site/docs/configure-content-themeLayout.md +0 -145
- package/skills/generating-experience-lwr-site/docs/configure-content-view.md +0 -233
- package/skills/generating-experience-lwr-site/docs/configure-guest-sharing-rules.md +0 -49
- package/skills/generating-experience-lwr-site/docs/handle-component-and-region-ids.md +0 -27
- package/skills/generating-experience-lwr-site/docs/handle-ui-components.md +0 -215
- package/skills/generating-experience-lwr-site/docs/update-site-urls.md +0 -100
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
# Content Type: sfdc_cms__view
|
|
2
|
-
|
|
3
|
-
**Use when** user explicitly requests creating a new page or editing an existing page.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- Purpose A: Generate New Views
|
|
8
|
-
- Purpose B: Editing Existing Views
|
|
9
|
-
|
|
10
|
-
## Purpose A: Generate New Views
|
|
11
|
-
|
|
12
|
-
### Generation Guidelines
|
|
13
|
-
|
|
14
|
-
**PAGE TYPES**: These guidelines supports two types of pages:
|
|
15
|
-
|
|
16
|
-
1. **Custom Pages** - Single view pages for custom content (e.g., About Us). **Note**: Standard pages (e.g., Home, Login) come pre-built with the site and cannot be created.
|
|
17
|
-
2. **Object Pages** - Requires 3 views: Detail, List, and Related List (e.g., Account, custom objects)
|
|
18
|
-
|
|
19
|
-
### Core Principles
|
|
20
|
-
|
|
21
|
-
1. **Route Association**: Views are referenced by routes via the `activeViewId` field.
|
|
22
|
-
2. **CRITICAL**: The `viewType` MUST exactly match the `routeType` in the corresponding route.
|
|
23
|
-
|
|
24
|
-
### Directory Structure (All Views)
|
|
25
|
-
|
|
26
|
-
1. **Location**: Views must be created under: `digitalExperiences/site/[SITE_NAME]/sfdc_cms__view/[VIEW_NAME]/`
|
|
27
|
-
2. **Required Files**:
|
|
28
|
-
- `_meta.json` - Metadata file defining the API name and type
|
|
29
|
-
- `content.json` - Content file defining the configuration and layout
|
|
30
|
-
3. **Naming Convention**: Underscore-separated names, no "__c" suffix (About_Us, Account_Detail)
|
|
31
|
-
|
|
32
|
-
### _meta.json Structure (All Views)
|
|
33
|
-
|
|
34
|
-
The `_meta.json` file must contain:
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"apiName": "[VIEW_NAME]",
|
|
39
|
-
"type": "sfdc_cms__view",
|
|
40
|
-
"path": "views"
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**Rules**:
|
|
45
|
-
|
|
46
|
-
- `apiName`: Must match directory name exactly. **No "__c" suffix**.
|
|
47
|
-
- `type`: Always `"sfdc_cms__view"`
|
|
48
|
-
- `path`: Always `"views"`
|
|
49
|
-
|
|
50
|
-
### Theme Layout Type (All Views)
|
|
51
|
-
|
|
52
|
-
The `contentBody.themeLayoutType` field specifies which theme layout to use for the view. There can only be one per view.
|
|
53
|
-
|
|
54
|
-
- **Default**: `"Inner"` - Use this default if the user does not specify a layout OR if the lookup fails to find a matching layoutType
|
|
55
|
-
- **Lookup**: To find valid values:
|
|
56
|
-
1. Navigate up from the current view directory to the site directory
|
|
57
|
-
2. Look in `sfdc_cms__theme/` (sibling directory to `sfdc_cms__view/`)
|
|
58
|
-
3. Find the theme directory (typically one per site)
|
|
59
|
-
4. Check `content.json` → `contentBody.layouts[]` for the layouts array
|
|
60
|
-
|
|
61
|
-
- **Layout Name/ID Resolution**: If the user provides only a layout name or ID (e.g., "scopedHeaderAndFooter"), you must look up the corresponding `layoutType`:
|
|
62
|
-
1. Find the theme's `content.json` as described above
|
|
63
|
-
2. Locate the `contentBody.layouts` array containing `layoutId`/`layoutType` pairs
|
|
64
|
-
3. Match the user-provided name/ID against `layoutId` values
|
|
65
|
-
4. Use the corresponding `layoutType` value for `contentBody.themeLayoutType`
|
|
66
|
-
5. **Use ONLY the `layoutType` value** for `contentBody.themeLayoutType` - do NOT use the layoutId or user's provided name
|
|
67
|
-
6. **If no match is found, use the default `"Inner"`**
|
|
68
|
-
|
|
69
|
-
### PART A: CUSTOM PAGES
|
|
70
|
-
|
|
71
|
-
Use this section when creating single-view custom content pages.
|
|
72
|
-
|
|
73
|
-
#### A.1. content.json Structure
|
|
74
|
-
|
|
75
|
-
The `content.json` file must contain:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"type": "sfdc_cms__view",
|
|
80
|
-
"title": "[DISPLAY_TITLE]",
|
|
81
|
-
"contentBody": {},
|
|
82
|
-
"urlName": "[URL_NAME]"
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**Field Definitions**:
|
|
87
|
-
|
|
88
|
-
- `type`: Always `"sfdc_cms__view"`
|
|
89
|
-
- `title`: Human-readable display title (e.g., About Us)
|
|
90
|
-
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
91
|
-
- `urlName`: Lowercase with hyphens (e.g., `about-us`)
|
|
92
|
-
|
|
93
|
-
#### A.2. Component Structure
|
|
94
|
-
|
|
95
|
-
**MUST** use `community_layout:sldsFlexibleLayout` as the root with exactly 2 regions (`content` and `sfdcHiddenRegion`), even if no components exist:
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
community_layout:sldsFlexibleLayout (root)
|
|
99
|
-
├── content (region) — main page content
|
|
100
|
-
└── sfdcHiddenRegion (region) — hidden region for SEO and metadata
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**CRITICAL REQUIREMENTS**:
|
|
104
|
-
|
|
105
|
-
- **Region names are fixed**: The region `name` field MUST be exactly `content` or `sfdcHiddenRegion`. Do NOT invent custom region names.
|
|
106
|
-
- **sfdcHiddenRegion MUST contain seoAssistant**: The `sfdcHiddenRegion` region MUST ALWAYS include a `community_builder:seoAssistant` component in its `children` array.
|
|
107
|
-
- **Components live in children**: All components are placed inside the `children` array of a region. Use an empty `children: []` array for `content` if no components exist.
|
|
108
|
-
|
|
109
|
-
Each region requires: `id` (unique UUID), `name`, `title`, `type: "region"`, `children`. Do not add any other fields.
|
|
110
|
-
|
|
111
|
-
#### A.3. Naming Conventions Summary
|
|
112
|
-
|
|
113
|
-
| Field | Format | Example |
|
|
114
|
-
|-|-|-|
|
|
115
|
-
| Directory/apiName | Underscore-separated, no "__c" | `About_Us` |
|
|
116
|
-
| title | Human-readable | `About Us` |
|
|
117
|
-
| viewType | `custom-` + lowercase-hyphens | `custom-about-us` |
|
|
118
|
-
| urlName | Lowercase-hyphens | `about-us` |
|
|
119
|
-
|
|
120
|
-
#### A.4. Route Dependency
|
|
121
|
-
|
|
122
|
-
The route's `activeViewId` must match the view's directory name exactly.
|
|
123
|
-
|
|
124
|
-
#### A.5. Generation Checklist
|
|
125
|
-
|
|
126
|
-
- [ ] Directory and `_meta.json` follow structure (see Directory Structure, _meta.json Structure)
|
|
127
|
-
- [ ] `content.json` has all required fields (A.1)
|
|
128
|
-
- [ ] Component structure correct with both regions (A.1)
|
|
129
|
-
- [ ] **CRITICAL**: Complete all the UUID generation steps. see [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md)
|
|
130
|
-
- [ ] `viewType` matches route's `routeType` (CRITICAL)
|
|
131
|
-
|
|
132
|
-
### PART B: OBJECT PAGES
|
|
133
|
-
|
|
134
|
-
Use this section when creating object pages that require Detail, List, and Related List views.
|
|
135
|
-
|
|
136
|
-
#### B.1. Overview
|
|
137
|
-
|
|
138
|
-
Object pages require **three views**: Detail, List, and Related List. All share the same object name.
|
|
139
|
-
|
|
140
|
-
**Object Types & viewType Format**:
|
|
141
|
-
|
|
142
|
-
| Object Type | Identifier | viewType Example |
|
|
143
|
-
|-|-|-|
|
|
144
|
-
| Standard (Account, Contact) | `keyPrefix` (3-char) | `detail-001`, `list-001`, `relatedlist-001` |
|
|
145
|
-
| Custom (Test_Object__c) | API name with `__c` | `detail-Test_Object__c`, `list-Test_Object__c` |
|
|
146
|
-
|
|
147
|
-
Obtain object information from the `objectList` MCP output from `sfdc_cms__route`:
|
|
148
|
-
|
|
149
|
-
```json
|
|
150
|
-
[
|
|
151
|
-
["Label", "ApiName", "KeyPrefix", "IsCustom"]
|
|
152
|
-
]
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
#### B.2. Required Views
|
|
156
|
-
|
|
157
|
-
Create three directories under `sfdc_cms__view/`:
|
|
158
|
-
|
|
159
|
-
- `[OBJECT_NAME]_Detail/`
|
|
160
|
-
- `[OBJECT_NAME]_List/`
|
|
161
|
-
- `[OBJECT_NAME]_Related_List/`
|
|
162
|
-
|
|
163
|
-
#### B.3. content.json Structure
|
|
164
|
-
|
|
165
|
-
```json
|
|
166
|
-
{
|
|
167
|
-
"type": "sfdc_cms__view",
|
|
168
|
-
"title": "[OBJECT_NAME] [TYPE]",
|
|
169
|
-
"contentBody": {
|
|
170
|
-
"component": {},
|
|
171
|
-
"dataProviders": [],
|
|
172
|
-
"themeLayoutType": "[THEME_LAYOUT_TYPE]",
|
|
173
|
-
"viewType": "[PREFIX]-[IDENTIFIER]"
|
|
174
|
-
},
|
|
175
|
-
"urlName": "[OBJECT_NAME_LOWERCASE]-[TYPE]"
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
**Field Definitions**:
|
|
180
|
-
|
|
181
|
-
- `type`: Always `"sfdc_cms__view"`
|
|
182
|
-
- `title`: Human-readable (e.g., "Account Detail")
|
|
183
|
-
- `contentBody`: Include all `required` properties from `schemaDefinition`. Use `examplesOfContentType` for reference.
|
|
184
|
-
- `contentBody.viewType`: **CRITICAL**: Must exactly match route's `routeType`
|
|
185
|
-
- `urlName`: Lowercase with hyphens (e.g., `account-detail`)
|
|
186
|
-
|
|
187
|
-
**Rules**:
|
|
188
|
-
|
|
189
|
-
- Before any actions, *always* call `execute_metadata_action` to get the full schema and examples per the skill document.
|
|
190
|
-
|
|
191
|
-
#### B.4. Component Structure
|
|
192
|
-
|
|
193
|
-
Uses same structure as Part A.1 (Component Structure) with these SEO assistant differences:
|
|
194
|
-
|
|
195
|
-
- **Detail View**: `pageTitle: "{!Record._Object}: {!Record._Title}"`
|
|
196
|
-
- **List/Related List Views**: `recordId: "{!recordId}"` (no pageTitle)
|
|
197
|
-
|
|
198
|
-
Default template includes one section with one empty column. `seedComponents` must be `[]` (not `null`).
|
|
199
|
-
|
|
200
|
-
#### B.5. Naming Conventions Summary
|
|
201
|
-
|
|
202
|
-
| Field | Detail | List | Related List |
|
|
203
|
-
|-|-|-|-|
|
|
204
|
-
| Directory/apiName | `[Object]_Detail` | `[Object]_List` | `[Object]_Related_List` |
|
|
205
|
-
| title | `[Object] Detail` | `[Object] List` | `[Object] Related List` |
|
|
206
|
-
| viewType (Standard) | `detail-[keyPrefix]` | `list-[keyPrefix]` | `relatedlist-[keyPrefix]` |
|
|
207
|
-
| viewType (Custom) | `detail-[ApiName__c]` | `list-[ApiName__c]` | `relatedlist-[ApiName__c]` |
|
|
208
|
-
| urlName | `[object]-detail` | `[object]-list` | `[object]-related-list` |
|
|
209
|
-
|
|
210
|
-
#### B.6. Route Dependency
|
|
211
|
-
|
|
212
|
-
The route's `activeViewId` must match the view's directory name exactly. The `viewType` must exactly match the route's `routeType`.
|
|
213
|
-
|
|
214
|
-
#### B.7. Generation Checklist
|
|
215
|
-
|
|
216
|
-
- [ ] Object type determined; identifier obtained (`keyPrefix` or API name with `__c`)
|
|
217
|
-
- [ ] All three views created: **Detail**, **List**, and **Related List**, each with `_meta.json` and `content.json`
|
|
218
|
-
- [ ] `viewType` matches route's `routeType` for all three views (CRITICAL)
|
|
219
|
-
- [ ] Component structure correct with both regions (see A.1)
|
|
220
|
-
- [ ] SEO assistant configured correctly per view type (B.4)
|
|
221
|
-
- [ ] **CRITICAL**: Complete both UUID generation steps. see [handle-component-and-region-ids.md](docs/handle-component-and-region-ids.md)
|
|
222
|
-
|
|
223
|
-
## Purpose B: Editing Existing Views
|
|
224
|
-
|
|
225
|
-
Use this section when modifying existing views under the `sfdc_cms__view` directory.
|
|
226
|
-
|
|
227
|
-
### Component Modifications
|
|
228
|
-
|
|
229
|
-
When adding, removing, or configuring components in existing views, **always** refer to [handle-ui-components.md](docs/handle-ui-components.md) for placement hierarchy, component structure, column layout, and property configuration.
|
|
230
|
-
|
|
231
|
-
### Theme Layout Type
|
|
232
|
-
|
|
233
|
-
To change a view's theme layout, update `contentBody.themeLayoutType` in the view's `content.json`. See **Theme Layout Type (All Views)** for default and lookup details
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Guest User Sharing Rules (Public Sites Only)
|
|
2
|
-
|
|
3
|
-
**Use when** the user asks to create or modify a guest sharing rule, mentions a username containing "Guest User" or "Site Guest User" (e.g. "ZenLease Site Guest User"), or wants to share object records with unauthenticated visitors.
|
|
4
|
-
|
|
5
|
-
## Steps
|
|
6
|
-
|
|
7
|
-
1. **Resolve the guest user identity**: If the user provides a username like "ZenLease Site Guest User", use it directly as the `<guestUser>` value (`CommunityNickname`). If a user ID is provided (e.g. `005AAC00003f8EP`), query the org to get the `CommunityNickname` first.
|
|
8
|
-
2. **Check for existing file**: Look for `sharingRules/{ObjectName}.sharingRules-meta.xml` locally. If missing, retrieve it from the org before editing.
|
|
9
|
-
3. **Generate the rule**: Follow the XML example and critical requirements below. Never use `sharingCriteriaRules` or `<role>`/`<group>` for guest rules.
|
|
10
|
-
|
|
11
|
-
If `sharingRules` metadata is not available locally in `force-app/main/default/sharingRules`, retrieve it from the org before creating new rules.
|
|
12
|
-
|
|
13
|
-
## Retrieve Full SharingRules Schema
|
|
14
|
-
|
|
15
|
-
Use the metadata MCP tool with metadataType "SharingRules" to retrieve schema.
|
|
16
|
-
|
|
17
|
-
## XML Example
|
|
18
|
-
|
|
19
|
-
```xml
|
|
20
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
21
|
-
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
22
|
-
<sharingGuestRules>
|
|
23
|
-
<fullName>ShareAccountsWithSiteGuest</fullName>
|
|
24
|
-
<accessLevel>Read</accessLevel>
|
|
25
|
-
<includeHVUOwnedRecords>false</includeHVUOwnedRecords>
|
|
26
|
-
<label>Share Accounts With Site Guest</label>
|
|
27
|
-
<sharedTo>
|
|
28
|
-
<guestUser>[site Guest User's CommunityNickanme]</guestUser>
|
|
29
|
-
</sharedTo>
|
|
30
|
-
<criteriaItems>
|
|
31
|
-
<field>Name</field>
|
|
32
|
-
<operation>notEqual</operation>
|
|
33
|
-
<value>null</value>
|
|
34
|
-
</criteriaItems>
|
|
35
|
-
</sharingGuestRules>
|
|
36
|
-
</SharingRules>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Critical Requirements
|
|
40
|
-
|
|
41
|
-
1. **SharedTo Element**: Must use `<guestUser>{site Guest User's CommunityNickanme}</guestUser>` (not URL path prefix).
|
|
42
|
-
2. **includeHVUOwnedRecords**: Required field. Set to `false` unless records owned by high-volume site users should be included.
|
|
43
|
-
3. **One XML file per object**: Put all rules for a given object in one file. Do not create additional.
|
|
44
|
-
|
|
45
|
-
## Common Mistakes
|
|
46
|
-
|
|
47
|
-
- Using `<role>` or `<group>` instead of `<guestUser>` in sharedTo
|
|
48
|
-
- Omitting the required `includeHVUOwnedRecords` field
|
|
49
|
-
- Using `includeRecordsOwnedByAll` (that's for `sharingCriteriaRules`, not guest rules)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# UUID Generation
|
|
2
|
-
|
|
3
|
-
**Use when** handling IDs for components and regions of views. All component and region IDs in Experience Site content must be unique UUIDs.
|
|
4
|
-
|
|
5
|
-
## Requirements
|
|
6
|
-
|
|
7
|
-
1. **Format**: Lowercase UUID v4 (e.g., `5d56a22f-c1e8-40d3-92ec-6e10e71e36de`)
|
|
8
|
-
2. **Uniqueness**: Must be unique across ALL `content.json` files in site (under `digitalExperiences/site/<SITE_NAME>/`)
|
|
9
|
-
|
|
10
|
-
## For New content.json Files Only
|
|
11
|
-
|
|
12
|
-
**Multistep Process (REQUIRED)**:
|
|
13
|
-
|
|
14
|
-
- **CRITICAL**: Each step must be performed separately - do NOT combine steps into a single automated command or script
|
|
15
|
-
- **Step 1**: Create files with descriptive placeholders for UUIDs (e.g., `UUID_CONTENT_REGION`, `UUID_HIDDEN_REGION`, `UUID_SEO_COMPONENT`)
|
|
16
|
-
- **Step 2**: Count the total number of UUID placeholder occurrences in the generated file, then generate exactly that many UUIDs using:
|
|
17
|
-
- `node -e "console.log(Array.from({length: N}, () => require('crypto').randomUUID()).join('\n'))"` where N is the total count of placeholder occurrences. Present this command to the user for execution.
|
|
18
|
-
- **Step 3**: Replace each placeholder occurrence sequentially with the generated UUIDs from the list, ensuring each occurrence gets a unique UUID from the list. Perform replacements one at a time or in small batches - do NOT automate this with scripts.
|
|
19
|
-
- **Step 4**: Validate that all placeholders have been replaced - read the file and search for any remaining placeholder patterns (e.g., `UUID_`). The file is NOT valid until all placeholders are replaced with actual UUIDs.
|
|
20
|
-
- **CRITICAL**: Every single placeholder occurrence must be replaced with a DIFFERENT UUID from the generated list, even if the placeholder name is repeated. For example, if you have 5 total placeholder occurrences, generate 5 UUIDs and replace each occurrence with the next UUID from the list.
|
|
21
|
-
- **NEVER** write UUIDs inline during file creation - always use the multistep placeholder approach
|
|
22
|
-
|
|
23
|
-
## For Editing Existing content.json Files
|
|
24
|
-
|
|
25
|
-
- **CRITICAL**: Read file first and preserve all existing UUIDs exactly as-is
|
|
26
|
-
- NEVER replace existing UUIDs with placeholders
|
|
27
|
-
- For newly added components/regions only, follow the multistep placeholder process from step 3
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
# UI Component Handling
|
|
2
|
-
|
|
3
|
-
**Use when** adding/configuring components to be used in Experience site.
|
|
4
|
-
|
|
5
|
-
## Component Insertion
|
|
6
|
-
|
|
7
|
-
Insert custom Lightning Web Components (LWC) into views.
|
|
8
|
-
|
|
9
|
-
### What is a Custom Component?
|
|
10
|
-
|
|
11
|
-
Any LWC in `c` namespace (e.g., `c:heroBanner`). Distinct from OOTB components (e.g., `community_builder:htmlEditor`).
|
|
12
|
-
|
|
13
|
-
### Prerequisites for Custom LWC
|
|
14
|
-
|
|
15
|
-
**js-meta.xml Requirements**:
|
|
16
|
-
|
|
17
|
-
- `<isExposed>true</isExposed>`
|
|
18
|
-
- Targets: `lightningCommunity__Page`, `lightningCommunity__Default`
|
|
19
|
-
|
|
20
|
-
**Property Type Constraints (MANDATORY GATE)**:
|
|
21
|
-
|
|
22
|
-
1. **Supported**: String, Integer, Boolean, Color, Picklist
|
|
23
|
-
2. **Unsupported**: Any other type → **STOP immediately**
|
|
24
|
-
- Do NOT delete, comment, or auto-correct
|
|
25
|
-
- Advise user to set up Custom Property Editor (CPE) or Custom Property Type
|
|
26
|
-
3. **Type Mismatch**: `type="Number"` → change to `type="Integer"` in js-meta.xml
|
|
27
|
-
|
|
28
|
-
**Do not proceed** until LWC files are compliant or user advised on CPE/CPT.
|
|
29
|
-
|
|
30
|
-
### Placement Hierarchy
|
|
31
|
-
|
|
32
|
-
**NEVER** place components directly in top-level regions. Must nest inside `community_layout:section` → column region.
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
community_layout:sldsFlexibleLayout (root)
|
|
36
|
-
└── region (content/header/footer)
|
|
37
|
-
└── community_layout:section
|
|
38
|
-
└── region (column: col1/col2)
|
|
39
|
-
└── component(s)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Column Width & Layout
|
|
43
|
-
|
|
44
|
-
**12-unit grid**: Column widths sum to 12 per section.
|
|
45
|
-
|
|
46
|
-
**Width Formats**:
|
|
47
|
-
|
|
48
|
-
- Grid units: 8 + 4
|
|
49
|
-
- Percentages: 66% + 33% → 8 + 4; 50% + 50% → 6 + 6
|
|
50
|
-
- Ratios: 2:1 → 8 + 4; 1:1 → 6 + 6; equal thirds → 4 + 4 + 4
|
|
51
|
-
|
|
52
|
-
**Layout Rules**:
|
|
53
|
-
|
|
54
|
-
- One section = one horizontal row
|
|
55
|
-
- Multiple rows = multiple sections (siblings)
|
|
56
|
-
- Multiple components in column = vertical stack
|
|
57
|
-
|
|
58
|
-
**Set width in** `sectionConfig` (JSON string attribute on section component).
|
|
59
|
-
|
|
60
|
-
### sectionConfig Structure
|
|
61
|
-
|
|
62
|
-
**Top-level** (when parsed):
|
|
63
|
-
|
|
64
|
-
- `UUID`: Section ID (matches section component's `id`)
|
|
65
|
-
- `columns`: Array of column definitions
|
|
66
|
-
|
|
67
|
-
**Each column**:
|
|
68
|
-
|
|
69
|
-
- `UUID`: Column ID (matches column region's `id`)
|
|
70
|
-
- `columnKey`: Column identifier (e.g., `col1`, `col2`) - matches column region's `name`
|
|
71
|
-
- `columnName`: Display name (e.g., "Column 1")
|
|
72
|
-
- `columnWidth`: String from `"1"` to `"12"` (must sum to 12)
|
|
73
|
-
- `seedComponents`: Array or `null` (typically `[]` or `null`)
|
|
74
|
-
|
|
75
|
-
**Example** (serialized as JSON string in `sectionConfig` attribute):
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"UUID": "295e6a8b-fd94-485b-af9d-7ccf5b3048ee",
|
|
80
|
-
"columns": [
|
|
81
|
-
{
|
|
82
|
-
"UUID": "7e1f7e33-5ba8-4fef-8494-6ea3e90b22a0",
|
|
83
|
-
"columnKey": "col1",
|
|
84
|
-
"columnName": "Column 1",
|
|
85
|
-
"columnWidth": "12",
|
|
86
|
-
"seedComponents": null
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Named Region Creation
|
|
93
|
-
In order to create a component with drag-n-droppable region/slot that can be used in Experience Builder sites and persist across views, there are multiple steps needed.
|
|
94
|
-
|
|
95
|
-
Page layout components should add the lightningCommunity__Page_Layout target in js-meta.xml.
|
|
96
|
-
Theme layout components should add the lightningCommunity__Theme_Layout target in js-meta.xml.
|
|
97
|
-
Add lightningCommunity__Page as a target for page layouts and any component with slots that is not explicitly defined as a theme layout.
|
|
98
|
-
|
|
99
|
-
The js file in LWC need to declare named slots:
|
|
100
|
-
```js
|
|
101
|
-
/**
|
|
102
|
-
* @slot header
|
|
103
|
-
* @slot footer
|
|
104
|
-
*/
|
|
105
|
-
export default class YourComponentName extends LightningElement {}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Do not add any other comments in the declaration comment block. The named @slot annotations must be the last comments
|
|
109
|
-
in the block before the class declaration.
|
|
110
|
-
|
|
111
|
-
In html, named slots are needed. <slot name="header"> and <slot name="footer"> in the above example.
|
|
112
|
-
|
|
113
|
-
For theme layout component, a <slot> with no name is the main content region, a slot with name is a sticky region that doesn't change from page to page that uses the same theme layout component.
|
|
114
|
-
|
|
115
|
-
No need to declare target config properties for the slots/regions.
|
|
116
|
-
See the example below for adding a component with named slots into a view.
|
|
117
|
-
|
|
118
|
-
### Component Structure
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"id": "[UNIQUE_UUID]",
|
|
123
|
-
"type": "component",
|
|
124
|
-
"definition": "[NAMESPACE]:[COMPONENT_NAME]",
|
|
125
|
-
"attributes": {
|
|
126
|
-
"[ATTRIBUTE_NAME]": "[ATTRIBUTE_VALUE]"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Field Definitions**:
|
|
132
|
-
|
|
133
|
-
- `id`: Unique UUID (see `handle-component-and-region-ids.md`)
|
|
134
|
-
- `type`: Always `"component"`
|
|
135
|
-
- `definition`:
|
|
136
|
-
- Custom LWC: `c:[componentName]` (e.g., `c:heroBanner`)
|
|
137
|
-
- OOTB: `[namespace]:[componentName]` (e.g., `community_builder:richTextEditor`)
|
|
138
|
-
- `attributes`: Component properties
|
|
139
|
-
- **Omit if no attributes** (don't include empty object)
|
|
140
|
-
- Custom LWC: Only `@api` properties in `targetConfigs` (with `lightningCommunity__Default` target)
|
|
141
|
-
- OOTB: Only exposed schema properties
|
|
142
|
-
|
|
143
|
-
### Complete Examples
|
|
144
|
-
|
|
145
|
-
**Example 1: Overall structure**
|
|
146
|
-
Correct nesting: `content` region → section → column region → components
|
|
147
|
-
|
|
148
|
-
```json
|
|
149
|
-
{
|
|
150
|
-
"type": "region",
|
|
151
|
-
"name": "content",
|
|
152
|
-
"children": [
|
|
153
|
-
{
|
|
154
|
-
"attributes": {
|
|
155
|
-
"sectionConfig": "{\"UUID\":\"295e6a8b-fd94-485b-af9d-7ccf5b3048ee\",\"columns\":[{\"UUID\":\"7e1f7e33-5ba8-4fef-8494-6ea3e90b22a0\",\"columnName\":\"Column 1\",\"columnKey\":\"col1\",\"columnWidth\":\"12\",\"seedComponents\":null}]}"
|
|
156
|
-
},
|
|
157
|
-
"children": [
|
|
158
|
-
{
|
|
159
|
-
"children": [
|
|
160
|
-
{
|
|
161
|
-
"definition": "c:testComponent",
|
|
162
|
-
"id": "2ae498bd-2871-487d-8fb1-b186376cee3b",
|
|
163
|
-
"type": "component"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"id": "7c7d3b6a-1e2f-4a33-9c1e-8b2a6d5f4e3b",
|
|
167
|
-
"type": "component",
|
|
168
|
-
"definition": "c:helloWorld",
|
|
169
|
-
"attributes": {
|
|
170
|
-
"title": "Hello"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"id": "7e1f7e33-5ba8-4fef-8494-6ea3e90b22a0",
|
|
175
|
-
"name": "col1",
|
|
176
|
-
"title": "Column 1",
|
|
177
|
-
"type": "region"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"definition": "community_layout:section",
|
|
181
|
-
"id": "295e6a8b-fd94-485b-af9d-7ccf5b3048ee",
|
|
182
|
-
"type": "component"
|
|
183
|
-
}
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
**CRITICAL**: Follow UUID generation process (`handle-component-and-region-ids.md`) when inserting components.
|
|
189
|
-
|
|
190
|
-
**Example 2: Representing slots**
|
|
191
|
-
If a component with slots (i.e. @slot annotation) is inserted, slots must appear as named regions.
|
|
192
|
-
In this example the component threeColumn has 3 slots, named left, center, and right.
|
|
193
|
-
```json
|
|
194
|
-
{
|
|
195
|
-
"attributes" : { },
|
|
196
|
-
"children" : [ {
|
|
197
|
-
"id" : "4c6148c7-c07e-4245-ae50-ac07891046f2",
|
|
198
|
-
"name" : "left",
|
|
199
|
-
"title" : "left",
|
|
200
|
-
"type" : "region"
|
|
201
|
-
}, {
|
|
202
|
-
"id" : "f362e789-7f09-40b4-a59f-03f76ea73401",
|
|
203
|
-
"name" : "center",
|
|
204
|
-
"title" : "center",
|
|
205
|
-
"type" : "region"
|
|
206
|
-
}, {
|
|
207
|
-
"id" : "2678ddd4-a1a4-41c4-bf5a-1a3e55891eb2",
|
|
208
|
-
"name" : "right",
|
|
209
|
-
"title" : "right",
|
|
210
|
-
"type" : "region"
|
|
211
|
-
} ],
|
|
212
|
-
"definition" : "c:threeColumn",
|
|
213
|
-
"id" : "b9e517c5-90ac-49e9-91b7-3730512c95a3",
|
|
214
|
-
"type" : "component"
|
|
215
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# Updating Experience Site URLs
|
|
2
|
-
|
|
3
|
-
Experience sites have a three-component architecture with two distinct URL patterns. Understanding this structure is critical when updating site URLs.
|
|
4
|
-
|
|
5
|
-
## Architecture Overview
|
|
6
|
-
|
|
7
|
-
Every Salesforce Experience Site consists of three components:
|
|
8
|
-
|
|
9
|
-
1. **Network** (metadata: `Network`) - Network configuration
|
|
10
|
-
2. **ChatterNetwork Site** (metadata: `CustomSite`) - Authentication endpoints and core site services
|
|
11
|
-
3. **ChatterNetworkPicasso Site** (metadata: `DigitalExperienceConfig` + `DigitalExperienceBundle`) - Customer-facing pages and content
|
|
12
|
-
|
|
13
|
-
## URL Pattern
|
|
14
|
-
|
|
15
|
-
These three components use **two different URLs**:
|
|
16
|
-
|
|
17
|
-
- **Primary URL** (ChatterNetworkPicasso): Used for customer-facing pages
|
|
18
|
-
- Defined in: `DigitalExperienceConfig` → `<urlPathPrefix>`
|
|
19
|
-
- Example: `mysite`
|
|
20
|
-
|
|
21
|
-
- **Secondary URL** (Network + CustomSite): Used for authentication endpoints and other services
|
|
22
|
-
- Defined in: `Network` → `<urlPathPrefix>` AND `CustomSite` → `<urlPathPrefix>`
|
|
23
|
-
- Example: `mysitevforcesite`
|
|
24
|
-
- **Must be synchronized** - both files must have identical values
|
|
25
|
-
|
|
26
|
-
By default, Salesforce differentiates these URLs by appending `vforcesite` suffix to the Network/CustomSite URL.
|
|
27
|
-
|
|
28
|
-
## URL Update Workflow
|
|
29
|
-
|
|
30
|
-
When updating site URLs, follow this workflow:
|
|
31
|
-
|
|
32
|
-
### Step 1: Discover All URL References
|
|
33
|
-
|
|
34
|
-
Search for all occurrences of `urlPathPrefix` across the project metadata files.
|
|
35
|
-
|
|
36
|
-
**For agents**: Use the `search_files` tool with these parameters:
|
|
37
|
-
- path: `force-app/main/default`
|
|
38
|
-
- regex: `urlPathPrefix`
|
|
39
|
-
- file_pattern: `*.xml`
|
|
40
|
-
|
|
41
|
-
**For humans**: Use your IDE's search functionality or command line tools:
|
|
42
|
-
```bash
|
|
43
|
-
# Using grep
|
|
44
|
-
grep -r "urlPathPrefix" force-app/main/default --include="*.xml"
|
|
45
|
-
|
|
46
|
-
# Using VS Code: Ctrl+Shift+F (Windows/Linux) or Cmd+Shift+F (Mac)
|
|
47
|
-
# Search for: urlPathPrefix
|
|
48
|
-
# Files to include: *.xml
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Step 2: Identify URL Groups
|
|
52
|
-
|
|
53
|
-
Determine which files belong to which URL group:
|
|
54
|
-
|
|
55
|
-
- **Primary URL Group**: `DigitalExperienceConfig`
|
|
56
|
-
- **Secondary URL Group**: `Network` AND `CustomSite`
|
|
57
|
-
|
|
58
|
-
### Step 3: Update URLs Consistently
|
|
59
|
-
|
|
60
|
-
Update the `<urlPathPrefix>` value in each file:
|
|
61
|
-
|
|
62
|
-
- **DigitalExperienceConfig**: Update to new primary URL
|
|
63
|
-
- **Network**: Update to new secondary URL (typically primary URL + `vforcesite`)
|
|
64
|
-
- **CustomSite**: Update to **same value as Network** (must be synchronized)
|
|
65
|
-
|
|
66
|
-
### Step 4: Validate Naming Convention
|
|
67
|
-
|
|
68
|
-
Ensure URL values follow best practices:
|
|
69
|
-
- Use lowercase letters only
|
|
70
|
-
- Avoid special characters except hyphens where appropriate
|
|
71
|
-
- Keep URLs concise and meaningful
|
|
72
|
-
|
|
73
|
-
### Step 5: Verify Consistency
|
|
74
|
-
|
|
75
|
-
Before deploying, confirm:
|
|
76
|
-
- [ ] Primary URL in `DigitalExperienceConfig` is set correctly
|
|
77
|
-
- [ ] Secondary URL in `Network` matches `CustomSite` exactly
|
|
78
|
-
- [ ] URLs are properly differentiated (typically via suffix)
|
|
79
|
-
- [ ] All URL values follow naming conventions
|
|
80
|
-
|
|
81
|
-
## Example URL Configuration
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
ChatterNetworkPicasso Site (Primary):
|
|
85
|
-
DigitalExperienceConfig: <urlPathPrefix>bestsupport</urlPathPrefix>
|
|
86
|
-
|
|
87
|
-
Network + ChatterNetwork Site (Secondary):
|
|
88
|
-
Network: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
|
|
89
|
-
CustomSite: <urlPathPrefix>bestsupportvforcesite</urlPathPrefix>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Common Pitfalls to Avoid
|
|
93
|
-
|
|
94
|
-
❌ **Don't** update only one or two files - all three must be updated
|
|
95
|
-
❌ **Don't** use different values in Network and CustomSite
|
|
96
|
-
❌ **Don't** use the same URL for both Primary and Secondary groups
|
|
97
|
-
❌ **Don't** skip the discovery step with `search_files`
|
|
98
|
-
✅ **Do** use `search_files` to find all occurrences first
|
|
99
|
-
✅ **Do** maintain URL differentiation between the two groups
|
|
100
|
-
✅ **Do** follow lowercase naming conventions
|