|
| 1 | +--- |
| 2 | +title: Customize default site designs on SharePoint |
| 3 | +description: Customize the default site designs in either the SharePoint team site or communications site template |
| 4 | +ms.date: 12/18/2017 |
| 5 | +--- |
| 6 | + |
| 7 | +# Customize a default site design |
| 8 | + |
| 9 | +> [!NOTE] |
| 10 | +> Site designs and site scripts are currently in preview and are subject to change. They are not currently supported for use in production environments. |
| 11 | +
|
| 12 | +SharePoint contains several site designs already available in the SharePoint Online site templates. These are the default site designs. You can modify them using PowerShell or the REST APIs to control the entire site provisioning experience. For example, you can ensure that your company theme is applied to every site that gets created. Or you can make sure a logging mechanism always runs regardless of which site design is chosen. |
| 13 | + |
| 14 | +## Apply a site design to the default site designs |
| 15 | + |
| 16 | +To customize the default site designs, apply a new one with the Powershell **Add-SPOSiteDesign** cmdlet, or the **CreateSiteDesign** REST API. Specify the **IsDefault** switch to apply the site design as default. |
| 17 | + |
| 18 | +The following example shows how to use the **IsDefault** switch to apply the Contoso company theme to the default site designs. The site script referenced by ID contains the JSON script to apply the correct theme. |
| 19 | + |
| 20 | +```powershell |
| 21 | +C:\> Add-SPOSiteDesign ` |
| 22 | + -Title "Contoso company theme" ` |
| 23 | + -WebTemplate "68" ` |
| 24 | + -SiteScripts "89516c6d-9f4d-4a57-ae79-36b0c95a817b" ` |
| 25 | + -Description "Applies standard company theme to site" ` |
| 26 | + -IsDefault |
| 27 | +``` |
| 28 | +```javascript |
| 29 | +RestRequest("/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteDesign", {info:{Title:"Contoso company theme", Description:"Applies standard company theme to site", SiteScriptIds:["89516c6d-9f4d-4a57-ae79-36b0c95a817b"], WebTemplate:"68", IsDefault: true}}); |
| 30 | +``` |
| 31 | + |
| 32 | +## Which default site designs are updated? |
| 33 | + |
| 34 | +In the previous example, the **WebTemplate** value of "68" refers to the SharePoint Online communication site template. That template contains the following default site designs: |
| 35 | + |
| 36 | +- Topic |
| 37 | +- Showcase |
| 38 | +- Blank |
| 39 | + |
| 40 | +When you apply a new site design, it will update all three of the default site designs at the same time. |
| 41 | + |
| 42 | +The SharePoint Online team site template contains only one default site design named **Team**. In this case when you apply a default site design, only the **Team** site design is updated. |
| 43 | + |
| 44 | +## Restoring the default site designs |
| 45 | + |
| 46 | +To restore a site design to the defaults, remove the site design you applied. In the previous example, if the site design created had the ID db752673-18fd-44db-865a-aa3e0b28698e, you would remove it as shown in the following example. |
| 47 | + |
| 48 | +```powershell |
| 49 | +C:\> Remove-SPOSiteDesign db752673-18fd-44db-865a-aa3e0b28698e |
| 50 | +``` |
| 51 | +```javascript |
| 52 | +RestRequest("/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteDesign", {id:"db752673-18fd-44db-865a-aa3e0b28698e"}); |
| 53 | +``` |
| 54 | + |
| 55 | +> [!NOTE] |
| 56 | +> If you're not sure which site design is the default, run the **Get-SPOSiteDesign** cmdlet. It will list all site designs, and indicates which ones are defaults. |
0 commit comments