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
Copy file name to clipboardExpand all lines: docs/declarative-customization/get-started-create-site-design.md
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,17 @@
1
+
---
2
+
title: Get started creating SharePoint site designs and site scripts
3
+
description: Get started creating SharePoint site designs and site scripts for users to create their own sites from.
4
+
ms.date: 12/14/2017
5
+
---
6
+
1
7
# Get started creating site designs and site scripts
2
8
9
+
> [!NOTE]
10
+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11
+
3
12
Build site designs to provide reusable lists, themes, layouts, pages, or custom actions so that your users can quickly build new SharePoint sites with the features they need. In this article you'll build a simple site design that adds a SharePoint list for tracking customer orders. Then you'll use the site design to create a new SharePoint site with the custom list.
4
13
5
-
This article shows how to use SharePoint PowerShell cmdlets to create site scripts and site designs. You can also use CSOM and REST APIs to perform the same actions. The corresponding CSOM and REST calls are shown for reference in each step.
14
+
This article shows how to use SharePoint PowerShell cmdlets to create site scripts and site designs. You can also use REST APIs to perform the same actions. The corresponding REST calls are shown for reference in each step.
6
15
7
16
## Create the site script in JSON
8
17
@@ -14,9 +23,6 @@ Each action is specified by the "verb" value in the JSON scipt. Also, actions ca
14
23
1. Follow the instructions at [Connect to SharePoint Online PowerShell](https://technet.microsoft.com/en-us/library/fp161372.aspx) to connect to your SharePoint tenant.
15
24
1. Create and assign the JSON that descripts the new script to a variable as shown in the PowerShell code below.
16
25
17
-
> ![NOTE]
18
-
> You can also specify the script in a CSV format. (TBD link to more info on CSV example)
19
-
20
26
```powershell
21
27
$site_script = @'
22
28
{
@@ -71,31 +77,31 @@ The previous script will create a new SharePoint list named Customer Tracking. I
71
77
72
78
## Add the site script
73
79
74
-
Each site script must be registered in SharePoint so that it is available to. Add a new site design by using the **Add-SPOSiteScript**command. The following example shows how to add the JSON script described previously.
80
+
Each site script must be registered in SharePoint so that it is available to. Add a new site design by using the **Add-SPOSiteScript**cmdlet. The following example shows how to add the JSON script described previously.
75
81
76
82
```powershell
77
83
C:\> Add-SPOSiteScript -Title "Create customer tracking list" -Content $site_script -Description "Creates list for tracking customer contact information"
78
84
```
79
85
80
-
After running the command you will get a result that lists the site script **ID** of the added script. Keep track of this ID somewhere because you will need it later when you create the site design.
86
+
After running the cmdlet you will get a result that lists the site script **ID** of the added script. Keep track of this ID somewhere because you will need it later when you create the site design.
81
87
82
-
The REST API to add a new site script is **CreateSiteScript**. (TBD add CSOM link)
88
+
The REST API to add a new site script is **CreateSiteScript**.
83
89
84
90
## Create the site design
85
91
86
92
Next you need to create the site design. The site design will appear in a drop down list when someone creates a new site from one of the templates. It can run one or more site scripts that have already been added.
87
93
88
-
- Run the following command to add a new site design. Replace \<ID\> with the site script ID from when you added the site script.
94
+
- Run the following cmdlet to add a new site design. Replace \<ID\> with the site script ID from when you added the site script.
89
95
90
96
```powershell
91
97
C:\> Add-SPOSiteDesign -Title "Contoso customer tracking" -WebTemplate "64" -SiteScripts "<ID>" -Description "Tracks key customer data in a list"
92
98
```
93
99
94
-
The previous command creates a new site design named Contoso customer tracking. The -WebTemplate value selects which base template to associate with. The value "64" indicates Team site template, and the value "68" indicates the communication site template.
100
+
The previous cmdlet creates a new site design named Contoso customer tracking. The -WebTemplate value selects which base template to associate with. The value "64" indicates Team site template, and the value "68" indicates the communication site template.
95
101
96
-
The JSON response will display the **ID** of the new site design. You can use in subsequent commands to update or modify the site design.
102
+
The JSON response will display the **ID** of the new site design. You can use in subsequent cmdlets to update or modify the site design.
97
103
98
-
The REST API to add a new site design is **CreateSiteDesign**. (TBD add CSOM link)
104
+
The REST API to add a new site design is **CreateSiteDesign**.
title: Applying a site design to a default SharePoint template
3
+
description: Customize the SharePoint team site or communications site template by applying a site design
4
+
ms.date: 12/14/2017
5
+
---
6
+
7
+
# Applying a site design to a default SharePoint template
8
+
9
+
> [!NOTE]
10
+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-json-schema.md
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
---
2
-
# Mandatory fields. See more on aka.ms/skyeye/meta.
3
2
title: Site design JSON schema
4
3
description: JSON schema reference for building site designs for SharePoint.
5
-
ms.date: 11/19/2017
4
+
ms.date: 12/14/2017
6
5
---
7
6
8
7
# Site design JSON schema
9
8
9
+
> [!NOTE]
10
+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11
+
10
12
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.
11
13
12
14
The overall JSON structure is specified as follows:
@@ -210,13 +212,16 @@ JSON value:
210
212
211
213
Example:
212
214
215
+
<!-- TBD: add link to Doug's Blue Yonder theme with note you need to create it first -->
216
+
213
217
```json
214
218
{
215
219
"verb": "applyTheme",
216
220
"themeName": "Blue Yonder"
217
221
}
218
222
```
219
223
224
+
<!--
220
225
## Create a page
221
226
222
227
Use the **createPage** verb to create a new page on the site.
@@ -247,6 +252,7 @@ Example:
247
252
"setAsHomePage": true
248
253
}
249
254
```
255
+
-->
250
256
251
257
## Set a site logo
252
258
@@ -267,7 +273,7 @@ Example:
267
273
268
274
## Join a hub site
269
275
270
-
Use the **joinHubSite** verb to join the site to a hub. <TBDprovidelinktomoreinformationonhubsandhowtogettheid>
276
+
Use the **joinHubSite** verb to join the site to a hub. <!--TBD provide link to more information on hubs and how to get the id-->
271
277
272
278
JSON value:
273
279
@@ -285,6 +291,7 @@ Example:
285
291
## Trigger a flow
286
292
287
293
Use the **triggerFlow** verb to kick off a custom flow.
294
+
<!-- update this with example from trigger workflow topic -->
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-overview.md
+32-11Lines changed: 32 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,14 @@
1
1
---
2
2
title: SharePoint site design and site script overview
3
-
description: Use site scripts and site designs to automate provisioning new SharePoint sites with custom configurations.
4
-
ms.date: 11/19/2017
3
+
description: Use SharePoint site scripts and site designs to automate provisioning new SharePoint sites with custom configurations.
4
+
ms.date: 12/14/2017
5
5
---
6
6
7
7
# SharePoint site design and site script overview
8
8
9
+
> [!NOTE]
10
+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11
+
9
12
Use site designs and site scripts to automate provisioning new SharePoint sites using your own custom configurations. When people in your organization create new SharePoint sites, you often need to ensure some level of consistency. For example, you may need proper branding and theming applied to each new site. You may also have detailed site provisioning scripts, such as using the PnP provisioning engine, that need to be applied each time a new site is created. This article describes how you can use site designs and site scripts to provide custom configurations to apply when new sites are created.
10
13
11
14
## How site designs work
@@ -18,15 +21,24 @@ Once a site design is selected, SharePoint creates the new site, and then runs a
18
21
19
22

20
23
21
-
You can create a site design by using PowerShell, CSOM, or the REST API. Here's an example of creating a new site design for the purpose of applying company branding.
24
+
You can create a site design by using PowerShell, or the REST API. Here's an example that creates a new site design that creates a customer list and applies a theme.
-Description "Creates customer list and applies standard theme" `
23
32
```
24
-
TBD Powershell example of creating site design for brand (show isdefault)
33
+
34
+
```javascript
35
+
RestRequest("/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteDesign", {info:{Title:"Contoso customer tracking", Description:"Creates customer list and applies standard theme", SiteScriptIds:["607aed52-6d61-490a-b692-c0f58a6981a1","5d4756e9-e1f5-42f7-afa7-5fa5aac170aa"], WebTemplate:"64"}});
25
36
```
26
37
27
-
You can also make a site design the default for the team or communication site template. Then when someone chooses only the template, you can still apply a custom design. This is done by setting the **IsDefault**property to true as shown previously.
38
+
In the previous example, the **SiteScripts** parameter contains the ID of two scripts that detail each action to run. We'll look at the site script contents in more detail later. The scripts will run in the order listed. The **WebTemplate** parameter value 64 indicates to register this site design with the team site template. The **Title**and **Description** parameters will be displayed when a user views site designs as they create a new team site. For more information on creating a site design, see [Get started creating site designs](get-started-create-site-design.md)
28
39
29
-
For more information, see [Get started creating site designs](get-started-create-site-design.md)
40
+
> [!NOTE]
41
+
> You can also make a site design the default for the team or communication site template. In this way you can modify the out-of-the-box base templates. For more information, see [Applying a site design to a default SharePoint template](site-design-apply-default-template.md).
30
42
31
43
## Anatomy of a site script
32
44
@@ -86,7 +98,7 @@ Site scripts are JSON files that specify an ordered list of actions to run when
86
98
87
99
Each action in a site script is specified by a **verb** value in the JSON. In the previous script the first action is specified by the **applyTheme** verb. Then the **createSPList** verb creates the list. Notice that the **createSPList** verb contains its own set of verbs which run additional actions on just the list.
88
100
89
-
Actions include:
101
+
Available actions include:
90
102
91
103
- Creating a new list
92
104
- Applying a theme
@@ -95,7 +107,7 @@ Actions include:
95
107
- Adding navigation
96
108
- Triggering a Microsoft flow
97
109
98
-
You can create site scripts by using PowerShell, CSOM, or the REST API. Here's an example of how to create a site script that applies the Blue Yonder theme.
110
+
You can create site scripts by using PowerShell or the REST API. Here's an example of how to create a site script that applies the Blue Yonder theme.
99
111
100
112
```
101
113
TBD PowerShell example create a script for blue yonder theme
@@ -120,16 +132,25 @@ The process works as follows:
120
132
1. The message triggers a call to an Azure function that you have configured.
121
133
1. The Azure function runs your custom script, such as the PnP provisioning engine, to apply your custom configurations.
122
134
123
-
For a step-by-step tutorial on how to configure your own Microsoft flow with PnP provisioning, see [Build a complete site design using the PnP provisioning engine](site-design-pnp-provisioning)
135
+
For a step-by-step tutorial on how to configure your own Microsoft flow with PnP provisioning, see [Build a complete site design using the PnP provisioning engine](site-design-pnp-provisioning.md)
124
136
125
137
## Scoping
126
138
127
139
You can configure site designs to only appear for specific groups or people in your organization. This is useful to ensure that people only see the site designs intended for them. For example, you may want the accounting department to only see site designs specific for them. And the accounting site designs may not make sense to show to anyone else.
128
140
129
-
Scopes are applied when you register a site design. You can specify the scope by user, Office 365 group, or a mail-enabled security group. Here is an example of registering a site design for only the accounting Office 365 group:
141
+
Scopes are applied when you register a site design. You can specify the scope by user, or a mail-enabled security group. Here is an example of registering a site design for only the accounting Office 365 group:
130
142
143
+
Here's an example of how to scope an existing site design so that only Nestor (a user at the fictional Contoso site) can view and use the site design.
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-pnp-provisioning.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
---
2
-
# Mandatory fields. See more on aka.ms/skyeye/meta.
3
-
title: Build a complete site design using the PnP provisioning engine
4
-
description: Build a complete site design using the PnP provisioning engine
5
-
ms.date: 11/19/2017
2
+
title: Build a complete SharePoint site design using the PnP provisioning engine
3
+
description: Build a complete SharePoint site design using the PnP provisioning engine
4
+
ms.date: 12/14/2017
6
5
---
7
6
8
7
# Calling the PnP Provisioning Engine from a Site Script
9
8
9
+
> [!NOTE]
10
+
> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for us in production environments.
11
+
10
12
Site Designs offer a great way to standardize the look and feel of your site collections. But if you want to take this one step further, by for instance adding a footer to every page, you might notice that Site Designs do not offer you that option. With the PnP Provisioning engine you can hover create a template which allows you to provision an application customizer to a site. This application customizer then can register a footer on every page. In this article you will learn how to create a site design that applies a PnP Provisioning Template to a site which in turn will add an application customizer to render a footer.
0 commit comments