Skip to content

Commit 8f14f50

Browse files
author
Vesa Juvonen
committed
Merge branch 'master' into live
2 parents 6902373 + aebc5c3 commit 8f14f50

File tree

1 file changed

+80
-4
lines changed

1 file changed

+80
-4
lines changed

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

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Site design JSON schema
33
description: JSON schema reference for building site designs for SharePoint.
4-
ms.date: 05/25/2018
4+
ms.date: 07/18/2018
55
---
66

77
# Site design JSON schema
@@ -133,7 +133,7 @@ Deletes a default field that was provided by the selected template type.
133133

134134
Enables defining fields and their elements using Collaborative Application Markup Language (CAML). For reference, see [Field element (Field)](https://docs.microsoft.com/en-us/sharepoint/dev/schema/field-element-field).
135135

136-
Currently these field constructs cannot be designated as site columns nor added to content types.
136+
Currently these field constructs cannot be designated as site columns nor added to content types. To create site columns with Field XML use the **createSiteColumnXml** action.
137137

138138
#### JSON value
139139

@@ -149,6 +149,27 @@ Currently these field constructs cannot be designated as site columns nor added
149149
}
150150
```
151151

152+
### addSPLookupFieldXml
153+
154+
Enables defining lookup fields and their dependent lists element using Collaborative Application Markup Language (CAML). For reference, see [Field element (Field)](https://docs.microsoft.com/en-us/sharepoint/dev/schema/field-element-field).
155+
156+
#### JSON value
157+
158+
- **schemaXml** – The CAML block to define the field.
159+
- **targetListName** – The name that identifies the list this lookup field is referencing. Provide either this or targetListUrl.
160+
- **targetListUrl** – A web-relative URL that identifies the list this lookup field is referencing. Provide either this or targetListName.
161+
- **addToDefaultView** – **True** if the field will be added to the default view; otherwise, **false**.
162+
163+
#### Example
164+
165+
```json
166+
{
167+
"verb": "addSPLookupFieldXml",
168+
"schemaXml": "<Field Type=\"Lookup\" DisplayName=\"Contoso Project Category\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" ShowField=\"Title\" UnlimitedLengthInDocumentLibrary=\"FALSE\" RelationshipDeleteBehavior=\"None\" ID=\"{101f1f89-d667-4c7f-9ebc-76cb5831d0a2}\" StaticName=\"ContosoProjectCategory\" Name=\"ContosoProjectCategory\" />",
169+
"targetListName": "Contoso Project Master"
170+
}
171+
```
172+
152173
### addSPView
153174

154175
Defines and adds a view to the list. Use this action to specify the desired columns and how you want the list items displayed (using a CAML query). Action properties allow you to specify row limits, and whether the view is paged and recurses over items in nested folders. You can also designate your constructed view as the default.
@@ -421,6 +442,23 @@ Use the **createSiteColumn** verb to define a new site column that can then be a
421442
}
422443
```
423444

445+
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.
446+
447+
#### JSON value
448+
449+
- **schemaXml** &ndash; The CAML block to define the field.
450+
- **pushChanges** &ndash; Indicates whether this change should be pushed to lists that already reference this field. Defaults to **true**.
451+
452+
#### Example
453+
454+
```json
455+
{
456+
"verb": "createSiteColumnXml",
457+
"schemaXml": "<Field Type=\"Choice\" DisplayName=\"Project Status\" Required=\"FALSE\" Format=\"Dropdown\" StaticName=\"ProjectStatus\" Name=\"ProjectStatus\"><Default>In Progress</Default><CHOICES><CHOICE>In Progress</CHOICE><CHOICE>In Review</CHOICE><CHOICE>Done</CHOICE><CHOICE>Has Issues</CHOICE></CHOICES></Field>"
458+
}
459+
```
460+
461+
424462
## Define a new content type
425463

426464
Use **createContentType** to define a new content type that can then be associated to a list by using the addContentType action.
@@ -502,8 +540,6 @@ Subaction to remove a site column from a list or content type.
502540
}
503541
```
504542

505-
506-
507543
## Add a navigation link
508544

509545
Use the **addNavLink** verb to add a new navigation link to the site.
@@ -535,6 +571,46 @@ Use the **addNavLink** verb to add a new navigation link to the site.
535571
}
536572
```
537573

574+
## Remove a navigation link
575+
576+
Use the **removeNavLink** verb to remove a navigation link from the site.
577+
578+
#### JSON values
579+
580+
- **url** &ndash; The url of the link to add.
581+
- **displayName** &ndash; The display name of the link.
582+
- **isWebRelative** &ndash; **True** if the link is web relative; otherwise, **false**.
583+
584+
#### Example
585+
586+
> [!NOTE]
587+
> This action can be used to remove site links added by the collaboration and communication site templates (for example, "home", "documents", "pages", "conversations", etc.).
588+
589+
590+
```json
591+
{
592+
"verb": "removeNavLink",
593+
"displayName": "Home",
594+
"isWebRelative": true
595+
},
596+
{
597+
"verb": "removeNavLink",
598+
"displayName": "Pages",
599+
"isWebRelative": true
600+
},
601+
{
602+
"verb": "removeNavLink",
603+
"displayName": "Conversations",
604+
"isWebRelative": true
605+
},
606+
{
607+
"verb": "removeNavLink",
608+
"url": "/_layouts/15/groupstatus.aspx?Target=TEAM",
609+
"displayName": "Teams",
610+
"isWebRelative": true
611+
}
612+
```
613+
538614
## Apply a theme
539615

540616
Use the **applyTheme** verb to add a custom theme to the site. For more information about how to construct and upload these themes, see [SharePoint site theming](site-theming/sharepoint-site-theming-overview.md). Note that this site action only works for applying custom themes; to apply one of our in-product SharePoint themes, create a copy as a custom one and reference that one.

0 commit comments

Comments
 (0)