The list template gallery is similar to the site template gallery shown earlier in Figure 3-4. You can click on a template name to download the file (. stp ), rename the file with the . cab extension, and view the contents by opening it with WinZip or Extract. List template files contain an XML description of the template ( manifest.xml ) as summarized here:
<?xml version="1.0" encoding="UTF-8"?> <ListTemplate WebUrl="http://wombat1"> <Details> <TemplateDescription>Demo list template.</TemplateDescription> <TemplateTitle>NewListTemplat</TemplateTitle> <Language>1033</Language> <TemplateID>1</TemplateID> <Configuration>0</Configuration> <TemplateType>105</TemplateType> <BaseType>0</BaseType> </Details> <Files> <File Name="AllItems.aspx" Src="00000000.000"> ... </File> <Folder Name="Attachments"> ... </Folder> <File Name="DispForm.aspx" Src="10000000.000"> ... </File> <File Name="EditForm.aspx" Src="20000000.000"> ... </File> <File Name="NewForm.aspx" Src="30000000.000"> ... </File> </Files> <UserLists> <List Name="{27E1B3BE-32C0-4CB3-A270-21E45D7429C8}" Title="NewListTemplate" Description="Demo list template." Direction="0" BaseType="0" ServerTemplate="105" Url="Lists/Contacts" Version="0"> ... </List> </UserLists> <WebParts> ... </WebParts> </ListTemplate>
To make changes to a custom list template directly:
-
Edit manifest.xml . You can find reference information about the elements in the SharePoint SDK Help file ( spptsdk.chm ).
-
Package the changed file using CabArc.exe . For example, the following command line packages changes as TeamWithPics2.stp .
CabArc n NewListTemplate2.stp manifest.xml
-
Upload the packaged file to SharePoint from the list template gallery (Figure 3-9).
Custom list templates added to the list template gallery appear on the Create page in SharePoint, as shown in Figure 3-10.
animal 3-10. Creating a list from a new custom template
As with custom site templates, list templates are stored in the configuration database. The configuration database provides top-level resources that are available to all SharePoint sites on the server, so custom list templates are automatically available to all sites. You can't selectively add or hide custom list templates for specific sites.