Understanding a site template
Before you work with a site template, it’s helpful to understand what a site template is in more detail so you can use it more effectively. This section discusses the following:Top of Page
What is a site template?
You're probably familiar with the default site templates, such as Team Site, Project Site, and Communities Site. SharePoint site templates are prebuilt definitions designed around a particular business need. You can use these templates as they are to create your own SharePoint site, and then customize the site as much as you want. For more information, see What kinds of sites can I create in SharePoint and Office 365?In addition to these default site templates, you can also create your own site template based on a site you've created and customized. A custom site template is a way to package site features and customizations that you can add to a solutions gallery. Custom site templates are often used to deploy solutions in other sites or to provide site consistency within your organization. For example, you may have a standard policy on project management, and so you require the use of a custom project site template for all new projects.
A custom site template is a powerful feature that allows you to create a solution and then share that solution with your peers, the broader organization, or outside organizations. You can also package the site into a Web Solution Package file (.wsp) and open it in another environment or application such as Visual Studio and further customize it there. Turning your customized site or business solution into a template is an extremely useful and very powerful capability. Once you start to package your solution as a template, you begin to realize the potential of SharePoint as a platform for business applications. Site templates make all of this possible.
Top of Page
What gets saved in a site template?
When you save a SharePoint site as a template, you're saving the overall framework of the site — its lists and libraries, views and forms, and workflows. In addition to these components, you can also include the contents of the site in the template; for example, the documents stored in the document libraries or data in the lists. This could be useful to provide sample content for users to get started with. But consider that including content could also increase the size of your template beyond the 50 MB site template limit.Most of the features in a site are included and supported by the template. However, there are several features that are not supported.
-
Supported Lists,
libraries, external lists, data source connections, list views and data
views, custom forms, workflows, content types, custom actions,
navigation, site pages, master pages, modules, and web templates.
-
Unsupported Customized
permissions, running workflow instances, list item version history,
workflow tasks associated with running workflows, people or group field
values, taxonomy field values, publishing sites and pages, and stapled
features.
Note Moving site templates between different versions, such as SharePoint 2010 to SharePoint 2013, is not supported.
Top of Page
What can you do with a site template?
Saving a site as a template is a powerful feature because it offers so many uses of custom sites. Here are the immediate benefits you get from saving a site as a template:-
Deploy solutions immediately
Save and activate the template in the solutions gallery and let other
employees create new sites from this template. They can select it, and
then create a new site from it, which will inherit the components of the
site, its structure, workflows, and more. In short, just save the site
as a template, activate it, and off you go.
-
Portability In addition
to deploying a custom solution in your environment, you can download
the .wsp file, take it on the road, and deploy it in another SharePoint
environment. All of your site customization is conveniently stored in
one file.
-
Extensibility As a Web
Solution Package, you can open your customized site in Visual Studio,
perform additional development customization to the template, and then
deploy it to SharePoint. As a result, site development can go through a
solution life cycle (develop, stage, and put into production).
Top of Page
Work with a site template
The basic steps to working with a site template are as follows:-
Save a site as a template to the Solutions Gallery
-
Download the site template from the Solutions Gallery to a file
-
Upload the site template file to a Solutions Gallery
-
Create a site based on your custom site template
-
Manage the Solutions Gallery
Save a site template to the Solutions Gallery
When you save a site template, you create a Web Solution Package file (.wsp) is that is stored in the Solutions Gallery for further use. Only the current site is saved; not any subsites below the site.-
Navigate to the top-level site of your site collection.
-
Click Settings and then click Site Settings.
-
In the Site Actions section, click Save site as a template.
-
Specify a name to use for the template file in the File name box.
-
Specify a name and description for the template in the Template name and Template description boxes.
-
To include the content of the site in the site template, select the Include Content check box. The limit is 50 MB and cannot be changed.
Important Before creating a site template that includes content, check the workflow history list for the site. If there are thousands of items in the list, it may take a long time to create the site template or you may exceed the limit of 50 MB. In this case, it’s a good idea to modify the workflow association to a use new workflow history list and then delete the original workflow history list before creating the site template.
-
Click OK to save the template.
If all of the components on the site are valid, the template is created, and you see a message that states "Operation Completed Successfully."
-
Do one of the following:
-
To return to your site, click OK.
-
To go directly to the site template, click Solutions Gallery.
-
To return to your site, click OK.
Download the site template from the Solutions Gallery
When you download your site template, you create a .wsp file that is portable and easy to use in other site collections.-
Navigate to the top-level site of your site collection.
-
Click Settings and then click Site Settings.
-
In the Web Designer Galleries section, click Solutions.
-
If it's necessary to activate the solution, select it, and in the Commands group, click Activate. Then, on the Activate Solution Confirmation screen, in the Commands group, click Activate.
-
Click its name in the solutions gallery, and click Save.
-
In the Save As dialog box, browse to the location where you want to save the solution, click Save, and then click Close.
Upload the site template to a Solutions Gallery
You can upload a .wsp file to the same site collection or different site collections in the same or different SharePoint environments.-
Navigate to the top-level site of your site collection.
-
Click Settings and then click Site Settings.
-
In the Web Designer Galleries section, click Solutions.
-
In the Commands group, click Upload, and then in the Add a Document dialog box, click Browse.
-
In the Choose File to Upload dialog box, locate the file, select it, click Open, and then click OK.
-
To activate the solution, on the Activate Solution confirmation screen, in the Commands group, click Activate.
Create a site from the site template
After you create a site template and confirm it is activated, you can create a site based on the template. The next time that you create a site or subsite, the template is available for selection in the Custom tab of the Template Selection section on the New SharePoint Site page.-
Click Site Actions and then New Site.
-
Click Browse All. Alternately, click Site Actions, View All Site Content, and click Create. You can filter the dialog by Site.
-
Scroll to the bottom of all listed templates.
-
Find and select your template.
-
Enter a Title and a URL name for the new site in the right-hand panel of the screen.
Top of Page
Manage the Solutions Gallery
You can control when a site template appears in the Create dialog box or its resource usage by activating and deactivating site templates in the Solution Gallery.-
Navigate to your Solution Gallery.
-
Click Settings , Site Settings, and, then under the Galleries section, click Solutions.
-
Select a site template, and then do one of the following:
-
Activate Makes the site template available for use when users create new sites through the Create dialog.
-
Deactivate Removes the site template from the Create dialog box. A deactivated site template is unavailable for site creation and can be deleted.
-
Delete Removes the
site template from the Solution Gallery, but moves it into to the
Recycle Bin for 90 days by default before the Recycle bin is emptied.
This is helpful if you later decide to restore it. If you need to delete
a site template, you must deactivate it first.
Note
-
Activate Makes the site template available for use when users create new sites through the Create dialog.
-
It is important to monitor the growth of the
Solutions Gallery. Each entry has a resource usage number assigned to
it. Solutions can consume resources, and for that reason they may be
temporarily disabled if resource usage exceeds quota.
-
If you upload a site template to a Solutions Gallery,
and the original site template is currently deactivated, you can
potentially overwrite the original site template. To avoid this, make
sure to uniquely name the site template you are uploading. However, you
will not be able to activate both solutions at the same time, and will
need to deactivate the original if you wish to use the newly uploaded
site template for site creation.
No comments:
Post a Comment