Skip to content

Commit 06913b4

Browse files
authored
Update site-design-json-schema.md (SharePoint#7675)
Helping make these updates requested by the PM owner: 1) Adding the new addContentTypesFromHub script action that recently released, 2) changing "Site design" to "Site template" everywhere, except in a few specific in-code references. How can we get the TOC entry under which this article also updated to say "Site templates & site scripts"?
1 parent 5d1c349 commit 06913b4

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

docs/declarative-customization/site-design-json-schema.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Site design JSON schema
3-
description: JSON schema reference for building site designs for SharePoint.
2+
title: Site template JSON schema
3+
description: JSON schema reference for building site templates for SharePoint.
44
ms.date: 09/24/2021
55
ms.localizationpriority: high
66
---
77

8-
# Site design JSON schema
8+
# Site template JSON schema
99

10-
The site design is a list of **actions**. For more complex actions, such as creating a list, there are also **subactions**. Each action is specified by a "verb" value. Verb actions are run in the order they appear in the JSON script. Only the verb actions listed here can be used; otherwise, an "unable to handle action" error will be thrown when trying to upload a site script. More actions will be added over time.
10+
The site template is a list of **actions**. For more complex actions, such as creating a list, there are also **subactions**. Each action is specified by a "verb" value. Verb actions are run in the order they appear in the JSON script. Only the verb actions listed here can be used; otherwise, an "unable to handle action" error will be thrown when trying to upload a site script. More actions will be added over time.
1111

1212
The overall JSON structure is specified as follows:
1313

@@ -26,7 +26,7 @@ The overall JSON structure is specified as follows:
2626

2727
You can view - and reference - the latest schema here: https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json
2828

29-
#### Applying site designs multiple times
29+
#### Applying site temlpates multiple times
3030

3131
**Actions** can be run more than once on a site. Rerunning **actions** on the same site with the same parameters will result in an update to the existing schema and not duplication of schema.
3232

@@ -282,6 +282,23 @@ Adds a content type to the list. Currently these are limited to the default cont
282282
}
283283
```
284284

285+
### addContentTypesFromHub
286+
287+
Manually syncs content types from a content type hub to a specific site.
288+
289+
#### JSON value
290+
291+
- `ids`: An array of the content type IDs that need to be synced.
292+
293+
#### Example
294+
295+
```json
296+
{
297+
"verb": "addContentTypesFromHub",
298+
"ids": ["0x01007CE30DD1206047728BAFD1C39A850120"]
299+
}
300+
```
301+
285302
### removeContentType
286303

287304
Removes a content type that was provided by the selected template type.
@@ -396,7 +413,7 @@ Registers field extension for a list field. For more information on these client
396413
"verb": "associateFieldCustomizer",
397414
"internalName": "ElectricSlide",
398415
"clientSideComponentId": "35944670-3111-4482-b152-9e9d1sean9f7",
399-
"clientSideComponentProperties": "{\"sampleText\":\"Yes - added by a site design, what?\"}"
416+
"clientSideComponentProperties": "{\"sampleText\":\"Yes - added by a site template, what?\"}"
400417
}
401418
]
402419
}
@@ -445,7 +462,7 @@ Associates a ListViewCommandSet to the list
445462
"title": "HelloWorld",
446463
"___location": "CommandBar",
447464
"clientSideComponentId": "13234283-d6c2-408f-a9ef-31a920c8ae78",
448-
"clientSideComponentProperties": "{\"sampleText\":\"added by a site design\"}"
465+
"clientSideComponentProperties": "{\"sampleText\":\"added by a site template\"}"
449466
}
450467
]
451468
}
@@ -456,7 +473,7 @@ Associates a ListViewCommandSet to the list
456473
Renames the list. To create a new list with a specific name, instead of using setTitle use the `listName` parameter in the `CreateSPList` action.
457474

458475
> [!NOTE]
459-
> Using `setTitle` will rename the list, preventing the list from updating if the site design is reapplied.
476+
> Using `setTitle` will rename the list, preventing the list from updating if the site template is reapplied.
460477
461478
#### JSON value
462479

@@ -1012,4 +1029,4 @@ Use the `setSiteExternalSharingCapability` action to manage guest access. For mo
10121029

10131030
## See also
10141031

1015-
- [SharePoint site design and site script overview](site-design-overview.md)
1032+
- [SharePoint site template and site script overview](site-design-overview.md)

0 commit comments

Comments
 (0)