Home > Articles > Web Development > Content Management Systems

Custom SharePoint 2003 Templates

  • Print
  • + Share This
Custom templates enable a user to define a default layout, functionality, and default content for a newly created site. A parallel can be drawn between a Microsoft Word stationery template and a SharePoint template. This chapter will help you get started with Microsoft SharePoint 2003 custom templates.
This chapter is from the book

Custom templates enable a user to define a default layout, functionality, and default content for a newly created site. A parallel can be drawn between a Microsoft Word stationery template and a SharePoint template. For instance, you might have a stationary template for Microsoft Word with your company logo, company colors, office address, and a myriad of other customizations. You can construct a SharePoint template with the same company logo, company colors, and many other customizations. The parallels continue in the application of SharePoint templates as well. Just as you can apply your Microsoft Word template to a new document, you can apply your SharePoint template to a new site.

Two types of custom templates exist: custom list templates and custom site templates. Custom list templates contain schema and content data for all types of lists. Thus, custom list templates apply to SharePoint lists. They therefore apply to document libraries, picture libraries, links, announcements, custom lists, and many others. Custom site templates apply to SharePoint sites, which could be top-level sites or subsites. Custom site templates contain schema and content data for everything that can be defined on a site, including lists, themes, web part content and layout, as well as many other customizations.

One of the most attractive features of custom templates is the existence of a graphical interface to construct them. This interface exists in the form of the SharePoint web interface as well as Microsoft FrontPage. The simplicity of this interface empowers you to quickly create a default look for your sites and lists that can be applied even more quickly to new sites. This feature avoids the tedious chore of manually performing each customization upon creating a new site. Instead, you click and drag your way to all these customizations.

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

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 customizations—including additional views and stock content—are 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.
  • + Share This
  • 🔖 Save To Your Account