Skip to content

Commit ea00020

Browse files
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>
1 parent e6a5500 commit ea00020

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

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

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,7 @@ Removes a view from a list. This action can also be used to remove a view applie
285285

286286
### addContentType
287287

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.
292289

293290
#### JSON value
294291

@@ -331,7 +328,7 @@ Sets column formatting for a field. For more information, see [Use column format
331328

332329
#### Example
333330

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.
335332

336333
```json
337334
{
@@ -383,7 +380,7 @@ Registers field extension for a list field. For more information on these client
383380
#### JSON values
384381

385382
- `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.
387384
- `clientSiteComponentProperties`: An optional parameter, which can be used to provide properties for the field customizer extension instance.
388385

389386
#### Example
@@ -431,7 +428,7 @@ Associates a ListViewCommandSet to the list
431428

432429
- `title`: The title of the extension.
433430
- `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.
435432
- `clientSideComponentProperties`: An optional parameter, which can be used to provide properties for the extension instance.
436433

437434
#### Example
@@ -474,7 +471,7 @@ Associates a ListViewCommandSet to the list
474471

475472
### setTitle
476473

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.
478475

479476
> [!NOTE]
480477
> 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
494491

495492
## Define a new site column
496493

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.
498495

499496
#### JSON value
500497

@@ -519,7 +516,7 @@ Use the `createSiteColumn` verb to define a new site column that can then be ass
519516
}
520517
```
521518

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.
523520

524521
#### JSON value
525522

@@ -537,12 +534,12 @@ Use the `createSiteColumnXml` verb to define a new site column for those complex
537534

538535
## Define a new content type
539536

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.
541538

542539
#### JSON value
543540

544541
> [!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`.
546543
547544
- `name`: The name of the content type to create.
548545
- `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
626623
- `navComponent`: The component where to add the link, QuickLaunch, Hub, or Footer. The default is **QuickLaunch**.
627624
- `isWebRelative`: **True** if the link is web relative; otherwise, **False**. The default is **False**.
628625
- `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.
630627
- `isParentUrlWebRelative`: An optional parameter. **True** if the link is web relative; otherwise, **False**. The default value is **False**.
631628

632629
#### Example
@@ -859,7 +856,7 @@ Use the `installSolution` action to install a deployed add-in or SharePoint Fram
859856
#### Example
860857

861858
> [!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.
863860
864861
```json
865862
{
@@ -878,8 +875,8 @@ Use the `associateExtension` action to register a deployed SharePoint Framework
878875
#### JSON values
879876

880877
- `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.
883880
- `clientSideComponentProperties`: An optional parameter, which can be used to provide properties for the extension instance.
884881
- `registrationId`: An optional parameter, which indicates the type of the list the extension is associated to (if it's a list extension).
885882
- `registrationType`: An optional parameter, which should be specified if the extension is associated with a list.

0 commit comments

Comments
 (0)