We can use visual studio2010 and owssvr. DLL to find the id value of the template used by the Sharepoint list.
Owssvr. DLL is actually an ISAPI extension registered in IIS. Its method can be directly through/_ vti_bin/owssvr. dll HTTP access to call. many office applications (such as Word, Excel, infopath, and SharePoint designer) can be remotely integrated between SharePoint servers through direct HTTP calls to owssrv, here we will use it to find the template ID.
The procedure is as follows (take the template ID of the list of a webpart gallery as an example ):
1. Use Visual studio2010 to determine the list ID
In Server Explorer of Visual Studio, add a new SharePoint connection to point to your SharePoint website, eg http: // sp2010 /. this Server Explorer will show you the full structure of the SharePoint farm. Although its content is read-only, it is enough for us. In this structure, find the Sharepoint list we need (a webpart gallery here) and display its properties. In the attribute column on the right, find the id value (eg: 9f7d064f-d9s8-62f1-8a4f-b02c9f4c259k ), copy the file for backup.
Ii. Use owssvr. DLL to determine the template ID
Based on the List ID obtained earlier, use owssvr to obtain the template ID by opening IE and entering the following URL (remember the copy ID above, put it at the end of the address): owssvr. DLL
Http: // sp2010/_ vti_bin/owssvr. dll? Cmd = exportlist & list = 9f7d064f-d9s8-62f1-8a4f-b02c9f4c259k
In this way, you will get an XML document, in which you can find what you want. (For example, the red part of the XML content below)
List name = "{9f7d064f-d9s8-62f1-8a4f-b02c9f4c259k}" Title = "Web Part Gallery" Description = "use this Web Part gallery to store and retrieve Web parts. the Web parts in this gallery are available to this site and all sites under it. to preview a Web part, click its title. "direction =" 0 "basetype =" 1"Servertemplate = "113"Url = "_ catalogs/WP" hiddenlist = "true" disableattachments = "true" foldercreation = "false" alwaysincludecontent = "true" rootwebonly = "true" catalog = "true" allowdeletion = "false" browserfilehandling = "Permissive" nocrawl = "true" version = "1">
-<Metadata>
-<Views>
+ <View name = "{283335b7-de62-4316-b3ef-14a46b17bf0f}" defaultview = "true" type = "html" displayname = "All Web parts" url = "_ catalogs/WP/Forms/allitems. aspx "level =" 1 "baseviewid =" 1 "contenttypeid =" 0x "toolbartemplate =" webpartgalleryviewtoolbar "imageurl ="/_ layouts/images/wlicon.png ">