You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update addContentType description in JSON schema (#10753)
* Update addContentType description in JSON schema
Expanded the description of the addContentType function to include published enterprise content types and removed the note about unsupported enterprise content types.
* Update ms.date in site-design-json-schema.md
* docs: ✏️ fix formatting in site design JSON schema
- add bold/inline code formatting to filenames, verb
references, and property names for consistency
- fix typo and grammar issues
- revert ms.date to original value
---------
Co-authored-by: Andrew Connell <me@andrewconnell.com>
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-json-schema.md
+13-16Lines changed: 13 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -285,10 +285,7 @@ Removes a view from a list. This action can also be used to remove a view applie
285
285
286
286
### addContentType
287
287
288
-
Adds a content type to the list. Currently these are limited to the default content types included in the site template or ones defined in a script by using the createContentType action.
289
-
290
-
> [!NOTE]
291
-
> Currently we do not support adding enterprise content types.
288
+
Adds a content type to the list. Currently these are limited to the default content types included in the site template or ones defined in a script by using the `createContentType` action or published enterprise content types added by using the `addContentTypesFromHub` verb.
292
289
293
290
#### JSON value
294
291
@@ -331,7 +328,7 @@ Sets column formatting for a field. For more information, see [Use column format
331
328
332
329
#### Example
333
330
334
-
In this example, we are formatting a number column as a data bar.
331
+
In this example, we're formatting a number column as a data bar.
335
332
336
333
```json
337
334
{
@@ -383,7 +380,7 @@ Registers field extension for a list field. For more information on these client
383
380
#### JSON values
384
381
385
382
-`internalName`: The internal name of the field to operate on.
386
-
-`clientSiteComponentId`: The identifier (GUID) of the extension in the App Catalog. This property value can be found in the manifest.json file or in the elements.xml file.
383
+
-`clientSiteComponentId`: The identifier (GUID) of the extension in the App Catalog. This property value can be found in the **manifest.json** file or in the **elements.xml** file.
387
384
-`clientSiteComponentProperties`: An optional parameter, which can be used to provide properties for the field customizer extension instance.
388
385
389
386
#### Example
@@ -431,7 +428,7 @@ Associates a ListViewCommandSet to the list
431
428
432
429
-`title`: The title of the extension.
433
430
-`location`: A required parameter to specify where the command is displayed. Options are: ClientSideExtension.ListViewCommandSet.ContextMenu or ClientSideExtension.ListViewCommandSet.CommandBar.
434
-
-`clientSideComponentId`: The identifier (GUID) of the extension in the App Catalog. This property value can be found in the manifest.json file or in the elements.xml file.
431
+
-`clientSideComponentId`: The identifier (GUID) of the extension in the App Catalog. This property value can be found in the **manifest.json** file or in the **elements.xml** file.
435
432
-`clientSideComponentProperties`: An optional parameter, which can be used to provide properties for the extension instance.
436
433
437
434
#### Example
@@ -474,7 +471,7 @@ Associates a ListViewCommandSet to the list
474
471
475
472
### setTitle
476
473
477
-
Renames the list. To create a new list with a specific name, instead of using setTitle use the `listName` parameter in the `CreateSPList` action.
474
+
Renames the list. To create a new list with a specific name, instead of using `setTitle` use the `listName` parameter in the `createSPList` action.
478
475
479
476
> [!NOTE]
480
477
> Using `setTitle` will rename the list, preventing the list from updating if the site template is reapplied. Avoid using `setTitle` in the `CreateSPList` as it will conflict with the `listName` parameter, use another site script applied separately for the rename.
@@ -494,7 +491,7 @@ Renames the list. To create a new list with a specific name, instead of using se
494
491
495
492
## Define a new site column
496
493
497
-
Use the `createSiteColumn` verb to define a new site column that can then be associated to a list directly or by using the addContentType action.
494
+
Use the `createSiteColumn` verb to define a new site column that can then be associated to a list directly or by using the `addContentType` action.
498
495
499
496
#### JSON value
500
497
@@ -519,7 +516,7 @@ Use the `createSiteColumn` verb to define a new site column that can then be ass
519
516
}
520
517
```
521
518
522
-
Use the `createSiteColumnXml` verb to define a new site column for those complex data types not supported by createSiteColumn. These columns can then be associated to a list directly or by using the addContentType action. Providing the ID attribute in the field schemaXml is important in order to prevent the field from being created multiple times if the script is run more than once.
519
+
Use the `createSiteColumnXml` verb to define a new site column for those complex data types not supported by `createSiteColumn`. These columns can then be associated to a list directly or by using the `addContentType` action. Providing the ID attribute in the field `schemaXml` is important in order to prevent the field from being created multiple times if the script is run more than once.
523
520
524
521
#### JSON value
525
522
@@ -537,12 +534,12 @@ Use the `createSiteColumnXml` verb to define a new site column for those complex
537
534
538
535
## Define a new content type
539
536
540
-
Use **createContentType** to define a new content type that can then be associated to a list by using the addContentType action.
537
+
Use **createContentType** to define a new content type that can then be associated to a list by using the `addContentType` action.
541
538
542
539
#### JSON value
543
540
544
541
> [!NOTE]
545
-
> When referencing the content type ID, only one of the three references are required - ID, parentName, or parentId.
542
+
> When referencing the content type ID, only one of the three references is required - `id`, `parentName`, or `parentId`.
546
543
547
544
-`name`: The name of the content type to create.
548
545
-`description`: The optional description of the content type.
@@ -626,7 +623,7 @@ Use the `addNavLink` verb to add a new navigation link to the site QuickLaunch o
626
623
-`navComponent`: The component where to add the link, QuickLaunch, Hub, or Footer. The default is **QuickLaunch**.
627
624
-`isWebRelative`: **True** if the link is web relative; otherwise, **False**. The default is **False**.
628
625
-`parentDisplayName`: An optional parameter. If provided, it makes this navigation link a child (sub link) of the navigation link with this displayName. If both this and parentUrl are provided, it searches for a link that matches both to be the parent.
629
-
-`parentUrl`: An optional parameter. If provided, it makes this navigation link a child (sub link) of the navigation link with this URL. If both this and parentDisplayName are provided, it searches for a link that matches both to be the parent.
626
+
-`parentUrl`: An optional parameter. If provided, it makes this navigation link a child (sub link) of the navigation link with this URL. If both this and `parentDisplayName` are provided, it searches for a link that matches both to be the parent.
630
627
-`isParentUrlWebRelative`: An optional parameter. **True** if the link is web relative; otherwise, **False**. The default value is **False**.
631
628
632
629
#### Example
@@ -859,7 +856,7 @@ Use the `installSolution` action to install a deployed add-in or SharePoint Fram
859
856
#### Example
860
857
861
858
> [!NOTE]
862
-
> To get the solution ID, sign in to a site by using the **Connect-PnPOnline** cmdlet, and then run **Get-PnPApp**. This returns a list of your deployed solutions. For multi-geo tenants, use the Product ID after setting up the solution in each geo location. Obtain the Product ID by uplaoding the solution to the app catalog or in the solution's definition.
859
+
> To get the solution ID, sign in to a site by using the **Connect-PnPOnline** cmdlet, and then run **Get-PnPApp**. This returns a list of your deployed solutions. For multi-geo tenants, use the Product ID after setting up the solution in each geo location. Obtain the Product ID by uploading the solution to the app catalog or in the solution's definition.
863
860
864
861
```json
865
862
{
@@ -878,8 +875,8 @@ Use the `associateExtension` action to register a deployed SharePoint Framework
878
875
#### JSON values
879
876
880
877
-`title`: The title of the extension in the App Catalog.
881
-
-`location`: Used to specify the extension type. If it's used to create commands, then where the command would be displayed; otherwise this should be set to ClientSideExtension.ApplicationCustomizer.
882
-
-`clientSideComponentId`: The identifier (GUID) of the extension in the App Catalog. This property value can be found in the manifest.json file or in the elements.xml file.
878
+
-`location`: Used to specify the extension type. If it's used to create commands, then where the command would be displayed; otherwise this should be set to `ClientSideExtension.ApplicationCustomizer`.
879
+
-`clientSideComponentId`: The identifier (GUID) of the extension in the App Catalog. This property value can be found in the **manifest.json** file or in the **elements.xml** file.
883
880
-`clientSideComponentProperties`: An optional parameter, which can be used to provide properties for the extension instance.
884
881
-`registrationId`: An optional parameter, which indicates the type of the list the extension is associated to (if it's a list extension).
885
882
-`registrationType`: An optional parameter, which should be specified if the extension is associated with a list.
0 commit comments