Any List/Library in SharePoint can be saved as template (STP) .
Go to List/Library > Library Settings > Save document Library as Template
- Provide File Name, Template Name and Template description ( you can choose to include content of source in the template)
- You can visit List template gallery (Site settings > List template gallery) , and your template will be found saved there. You can easily open the list template gallery in explorer view and extract the stp file on your hard disk. This can be uploaded on any site collection as target.
- This template is available for new list creation in current site collection wherever this List template stp file is available under List Template Gallery. Visit Site Content >Add an App > you will find your template to create new List/Library here.
- You would be able to create a List/Library with same set of columns and views as the source of template
Please visit Library settings and observe different list settings like version setting metadata navigation, security etc.
A sub site can also be saved as template.
Go to site settings > Save site as Template
- Provide File Name, Template Name and Template description. Description (you can choose to include content of source sub site’s list and libraries in the template.)
- Please note site template is being saved as a wsp under Solution Gallery ( /_catalogs/solutions/forms/allitems.aspx) This can be uploaded on any site collection as target.
- Go to Site content > New sub site > under template choose custom and you can create a replica of source sub site.
- Security settings are not saved in List / site Templates
- Default max size for list/site templates is 50 MB which can be changed by administrator. But you won’t go beyond 500 MB though
$tSize = 50000000
$myW = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$myW.MaxTemplateDocumentSize = $tSize
- List definition / site definition based on which source list / sub site was created, must be present on target.
- List / site templates are saved in content data base of site collection.
- Once target is created using a template, it has no relation with template. These templates are only scripts to create the target. If you missed something in source before creating a template, redo creation of target.
- If you are looking for code level high customization on the top of default list definition, better you choose custom list definition than list/ site templates.