Save Document Library as Template

Most organizations will customize a selection of lists and libraries and then use them as templates. This section gives an example of creating a List template from a document library and some tips pertaining to the use of these templates (as well as some of the limitations). Although these templates can be very useful, a site administrator should test them thoroughly to become familiar with the upsides as well as downsides of using them, and might want to focus instead on using site templates for reasons provided next.

To create a List template, follow these steps:

  1. From the Document Library Settings page for the library, click the Save Document Library as Template link.
  2. Enter a filename (for example, DocLib050410) and a template name (which can be the same as the filename). Leave the Save Content box unchecked. Click OK.
  3. The Operation Completed Successfully message will appear. Click the List Template Gallery link visible in the body of the message. The List Template Gallery for the site collection will open.

The templates are stored in the List template gallery, accessible via the Site Settings page for the site, by clicking List Templates from the Galleries section. After a List template has been saved, it will be available from the Create.aspx page for lists and libraries, or the Create window if SilverLight is installed.

The following list provides some tips for effectively using it:

• Create a site that contains the template lists and libraries so they can be edited at a later date and then save to the List Template Gallery. Do not use this site for production purposes (for example, storing “live” files or list data) because it will be modified in the future and new templates created from it, possibly Site templates, as well.

• Create a logical naming scheme for the List templates that includes an identifier, such as the date it was created. For example, a name such as ProjectDocLib010110 is more useful than DocLibraryV1 because it describes the type of library (a project library) and contains the date when it was created, which will be visible when creating new libraries from it.

• Although the option is given to Include Content when creating a template, there is a fairly small size limit of 50MB. Therefore, this is not a very powerful backup and restore tool for document libraries because most document libraries quickly exceed this limit, but could be useful for lists.

• List templates are only shared within a site collection. List templates can be saved locally from one List Template Gallery and then uploaded to other List Template Galleries for other site collections.

• Changes to the List template will not affect lists previously created with the List template. So, for example, if five lists have been created using AnnouncementsTemplate050410, each one will need to be visited separately to replicate the changes.

• When the List template is used to create a list at a later date, consider putting the name of the template used in the description field of the list. This will make it easier to tell which template was used to create which list at a later date.

• If too many List templates are created, the Create page or Create window will become very cluttered and confusing. Consider creating Site templates rather than List templates for this reason.

Although it is not a recommended best practice to modify the List template, more advanced administrators may be interested in viewing the contents of the List template. Follow these steps to view the contents of a List template manifest xml document for a template created for a document library:

  1. Visit the List Template Gallery and choose a template. Right-click the name of the template (DocLib050410, for example, as created previously) and click Save Target As. Save the document to your desktop using the same name. Note that the file extension is .stp.
  2. Click Open Folder when the download completes.
  3. Right click the STP file and click Rename. Change the extension of the file from .stp to .cab. Press Enter.

    Note

    You might need to change the view settings in Control Panel if you can’t edit the extension. For Windows 7, navigate to the Control Panel, click Folder Options, click the View tab, unselect Hide Extensions for Known File Types, and then click OK, and you should be able to now change the extension.

  4. Click Yes for the Rename warning. The file will now be listed as a .cab file.
  5. Right-click the file and click Open. This will show the contents of the .cab file.
  6. Right-click the manifest XML file and click Extract. Save to the desktop once again.
  7. Locate the manifest file on the desktop, right-click the document, and choose Open With, and select Internet Explorer. You will now be able to see all the contents of the manifest file.

Armed with the preceding information, the site administrator should experiment with using List templates and determine whether they provide value for the organization or whether creating these templates clutters up the list creation options and will be confusing, and whether site templates, each with customized lists, make more sense for the organization.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset