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
- Removed all instances of "site design(s)" unless it appears in script
- Updated the published template entry point to Settings > Apply site template
- Added channel sites to the list of sites compatible with site templates
Copy file name to clipboardExpand all lines: docs/declarative-customization/get-started-create-site-design.md
+47-33Lines changed: 47 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
-
title: Get started creating SharePoint site designs and site scripts
3
-
description: Create 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.
4
-
ms.date: 08/05/2021
2
+
title: Get started creating SharePoint site templates and site scripts
3
+
description: Create site templates 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.
4
+
ms.date: 08/23/2021
5
5
localization_priority: Priority
6
6
---
7
7
8
-
# Get started creating site designs and site scripts
8
+
# Get started creating site templates and site scripts
9
9
10
-
You can create site designs to provide reusable lists, themes, layouts, pages (experimental), or custom actions so that your users can quickly build new SharePoint sites with the features they need.
10
+
You can create site templates to provide reusable lists, themes, layouts, pages (experimental), or custom actions so that your users can quickly build new SharePoint sites with the features they need.
11
11
12
-
This article describes how to build a simple site design that adds a SharePoint list for tracking customer orders. You'll use the site design to create a new SharePoint site with the custom list. You'll learn 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.
12
+
This article describes how to build a simple site template that adds a SharePoint list for tracking customer orders. You'll use the site template to create a new SharePoint site with the custom list. You'll learn how to use SharePoint PowerShell cmdlets to create site scripts and site templates. You can also use REST APIs to perform the same actions. The corresponding REST calls are shown for reference in each step.
13
13
14
14
## Create the site script in JSON
15
15
@@ -71,7 +71,7 @@ Each action is specified by the "verb" value in the JSON script. Also, actions c
71
71
'
72
72
```
73
73
74
-
The previous script creates a new SharePoint list named **Customer Tracking**. It sets the description and adds four fields to the list. Note that each of these are considered an action. Site scripts are limited to 30 cumulative actions (across one or more scripts that may be called in a site design) if applied programmatically using the `Invoke-SPOSiteDesign` command. If they are applied through the UI or using the `Add-SPOSiteDesignTask` command then the limit is 300 cumulative actions (or 100K characters).
74
+
The previous script creates a new SharePoint list named **Customer Tracking**. It sets the description and adds four fields to the list. Note that each of these are considered an action. Site scripts are limited to 30 cumulative actions (across one or more scripts that may be called in a site template) if applied programmatically using the `Invoke-SPOSiteDesign` command. If they are applied through the UI or using the `Add-SPOSiteDesignTask` command then the limit is 300 cumulative actions (or 100K characters).
75
75
76
76
## Add the site script
77
77
@@ -84,15 +84,15 @@ C:\> Add-SPOSiteScript
84
84
-Description "Creates list for tracking customer contact information"
85
85
```
86
86
87
-
After running the cmdlet, you 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.
87
+
After running the cmdlet, you 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 template.
88
88
89
89
The REST API to add a new site script is **CreateSiteScript**.
90
90
91
-
## Create the site design
91
+
## Create the site template
92
92
93
-
Next, you need to create the site design. The site design appears 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.
93
+
Next, you need to create the site template. The site template appears 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.
94
94
95
-
- Run the following cmdlet to add a new site design. Replace `<ID>` with the site script ID from when you added the site script.
95
+
- Run the following cmdlet to add a new site template. Replace `<ID>` with the site script ID from when you added the site script.
96
96
97
97
```powershell
98
98
C:\> Add-SPOSiteDesign
@@ -102,46 +102,60 @@ C:\> Add-SPOSiteDesign
102
102
-Description "Tracks key customer data in a list"
103
103
```
104
104
105
-
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. If you have disabled modern Group creation (or restricted to a subset of users) and wish to still allow your users to apply site designs to the "group-less" modern Team site template, publish your site designs using the `-WebTemplate` value `"1"`.
105
+
The previous cmdlet creates a new site template named Contoso customer tracking.
106
106
107
-
The JSON response displays the **ID** of the new site design. You can use it in subsequent cmdlets to update or modify the site design.
| WebTemplate 1 | 64 | Team site (with group creation disabled) |
111
+
| WebTemplate | 68 | Communication site template |
108
112
109
-
The REST API to add a new site design is **CreateSiteDesign**.
110
113
111
-
## Use the new site design
114
+
The JSON response displays the **ID** of the new site template. You can use it in subsequent cmdlets to update or modify the site template.
112
115
113
-
Now that you've added a site script and site design, you can use it to create new sites through the self-service site creation experience or apply the site design to an existing site using the **Invoke-SPOSiteDesign** command in PowerShell. If you are using hub sites you can even associate a site design to a hub so it gets applied to all joining sites.
116
+
The REST API to add a new site template is **CreateSiteDesign**.
117
+
118
+
## Use the new site template
119
+
120
+
Now that you've added a site script and site template, you can use it to create new sites through the self-service site creation experience or apply the site template to an existing site using the **Invoke-SPOSiteDesign** command in PowerShell. If you are using hub sites you can even associate a site template to a hub so it gets applied to all joining sites.
114
121
115
122
### New site creation
116
123
117
124
1. Go to the home page of the SharePoint site that you are using for development.
118
125
1. Choose **Create site**.
119
-
1. Choose **Team site**.
120
-
1. In the **Choose a design** drop-down, select your site design **Contoso customer tracking**.
121
-
1. In **Site name**, enter a name for the new site **Customer order tracking**.
122
-
1. Choose **Next**.
123
-
1. Choose **Finish**.
124
-
1. A notification bar will be displayed indicating that your script is being applied. To invoke the site design information panel, click the **View progress** link. Once the script(s) have completed the notification banner message will change to **Site Design applied. Refresh this site to see the changes.**, allowing you to either invoke the panel or refresh the page.
125
-
1. You will see the custom list on the page.
126
+
1. Choose **Team site**. SharePoint will create a team site using the Microsoft **Team collaboration template**.
127
+
2. Choose **Next**.
128
+
7. Choose **Finish**.
129
+
4. In **Site name**, enter a name for the new site **Customer order tracking**.
130
+
5. Next, go to **Settings** and select **Apply a site template**.
131
+
5. Select the site template you just created.
132
+
8. A progress bar will be display indicating that your new template is being applied.
133
+
9. When the new template has been applied, you will see the custom list on the page.
126
134
127
135
### Apply to an existing site collection
128
136
129
-
You can also apply a published site design to an existing site collection using the [Invoke-SPOSiteDesign](/powershell/module/sharepoint-online/Invoke-SPOSiteDesign) cmdlet.
137
+
You can also apply a published site templates to existing sites. On the home page of the site, site owners can navigate to **Settings** and then **Apply a site template** to browse and apply templates provided by your organization and Microsoft.
130
138
131
-
You can apply a published site design to:
139
+
You can apply templates to existing site collections in bulk by using the [Invoke-SPOSiteDesign](/powershell/module/sharepoint-online/Invoke-SPOSiteDesign) cmdlet.
132
140
133
-
1. Group-connected Team site
134
-
1. Team site not connected to a Microsoft 365 group
135
-
1. Communication site
136
-
1. Classic team site
137
-
1. Classic publishing site
141
+
**Published site templates can be applied to:**
138
142
139
-
The REST API to apply a site design to an existing site collection is **ApplySiteDesign**.
143
+
1. Group-connected team sites
144
+
1. Team sites that not connected to a Microsoft 365 group
145
+
1. Communication sites
146
+
2. Channel sites
147
+
3. Classic team sites
148
+
4. Classic publishing sites
149
+
150
+
The REST API to apply a site template to an existing site collection is **ApplySiteDesign**.
140
151
141
152
### Associate with a hub site
142
153
143
-
You can also associate a published site design to a hub site in hub site settings so it can be applied to all joining sites. For details on how to associate the site design either through the UI or using the `Set-SPOHubSite` cmdlet please review the [PowerShell cmdlets for SharePoint hub sites](../features/hub-site/hub-site-powershell.md) article.
154
+
Apply a published site template to a new or existing hub site. Then, all associated sites will inherit the hub site template and theme. Navigate to the home page of the hub and go to **Settings** and then **Apply a site template**. Learn more about how to [enable site associations for your hub site](https://support.microsoft.com/office/set-up-your-sharepoint-hub-site-e2daed64-658c-4462-aeaf-7d1a92eba098).
155
+
156
+
You can also use the `Set-SPOHubSite` cmdlet. Review the [PowerShell cmdlets for SharePoint hub sites](../features/hub-site/hub-site-powershell.md) article.
144
157
145
158
## See also
146
159
147
-
-[SharePoint site design and site script overview](site-design-overview.md)
160
+
-[SharePoint site template and site script overview](site-design-overview.md)
161
+
-[How to apply and customize SharePoint site templates](https://support.microsoft.com/office/apply-and-customize-sharepoint-site-templates-39382463-0e45-4d1b-be27-0e96aeec8398)
0 commit comments