Understanding Custom Templates


Custom site templates and site definition templates (see Chapter 2, "Site Definitions") appear to the user at site creation as a unified list of choices as shown in Figure 1.1. Custom list and site templates represent a delta or additional customizations to site definition templates. This delta acts as an addition to the base layer to form a two-layer structure. Consequently, custom site and list templates require more server processing than site definition templates.

Figure 1.1. Custom template and site definition template selection.


When a user designs a SharePoint list or site, those settings are captured in the database. For instance, a user's customization of a particular site can include applying a site theme, placing web parts, and creating additional list views. All these customizations are stored in the database. The same parallel can be drawn for lists. List customizationsincluding additional views and stock contentare stored in the database.

SharePoint provides a mechanism to harvest all these customizations to a list or site from the database. That mechanism is a custom template. A custom template is a compilation of customization settings in a single, reusable package. This package defines the delta between the site definition and our site or list customizations.

Custom site and list templates can be created on one server farm and copied to another. A key caveat to successfully rendering the copied template is the existence of the site definition on which the custom template is based. In fact, web parts or any other resources that are referenced in the template must also exist on the new server. If the site definition or other resources that the custom template expects do not exist, the custom template (delta) will have nothing on which to base its changes and will not render. If the site definition is different between server farms, the custom template can render in an unexpected fashion.

Using custom list or site templates is essentially a three-step process. The first step is to customize a list or site as desired. The second step is to save the template to the template gallery. The third and final step is to create a site or list with that template.

It should be noted that there are a few caveats to using custom templates:

  • A 10-megabyte limit exists on the total size of a site template.

  • Custom templates do not retain the security settings of the site or list from which they were copied.

  • Child sites cannot be retained in site templates. You must create any desired child site anew after site creation.




SharePoint 2003 Advanced Concepts. Site Definitions, Custom Templates, and Global Customizations
SharePoint 2003 Advanced Concepts: Site Definitions, Custom Templates, and Global Customizations
ISBN: 0321336615
EAN: 2147483647
Year: 2006
Pages: 64

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net