SharePoint - Programmatic Access to the new templates
Asked By dink33
21-May-07 12:38 PM
How would I go about accessing (through code), one of the new (40) templates?
In the past I've always been able to specify which template by using it's
ID#, but I cant seem to find anything about the new templates.
I do have the newest "default" list:
STS#0 Team Site
STS#1 Blank Site
STS#2 Document Workspace
MPS#0 Basic Meeting Workspace
MPS#1 Blank Meeting Workspace
MPS#2 Decision Meeting Workspace
MPS#3 Social Meeting Workspace
MPS#4 Multipage Meeting Workspace
WIKI#0 Wiki Site
BLOG#0 Blog Site
Bu this list doesn't include any of the other templates I've downloaded and
installed, for example the "Classroom Management" template. I've searched
all over for any reference to this in code, but just cant seem to find what
the ID for this template would be.
Any help would be most appreciated,
Thanks in advance.
Dez
MPS
(1)
STS
(1)
ID
(1)
DezErr
(1)
BLOG
(1)
WIKI
(1)
Workspace
(1)
Templates
(1)
dink33 replied...
Err...nevermind.
Turns out I was making this way more complicated than what it really was. I
was able to reference each of the additional templates by simply using their
template name instead of an ID (like you'd do with a site definition).
All works fine now.
Dez

Compliance Process Support Contacts Management Document Center BDR#0 Document Library and Review Document Workspace STS#2 Event Planning Expense Reimbursement and Approval Help Desk Inventory Tracking IT Team Workspace Job OFFILE#1 ? Room and Equipment Reservations Sales Lead Pipeline Search Center SRCHCENTERLITE#0 Team Site STS#0 Wiki WIKI#0 SharePoint Portal Server Discussions Windows SharePoint Services (1) SharePoint Server 2007 you must specify the template name as _GLOBAL_#number, where number refers to the template ID. If you add the template using UI to the Site Template Gallery, you should create templates shown in the SharePoint Server 2007 site creation UI for your information. Team Site STS#0 Blank Site STS#1 Document Workspace STS#2 Wiki WIKI#0 Blog BLOG#0 Basic Meeting Workspace MPS#0 Blank Meeting Workspace MPS#1 Decision Meeting Workspace MPS#2 Social Meeting Workspace MPS#3 Multipage Meeting Workspace MPS
to cab 4.) Extract the manifest.xml file. 5.) Search for TemplateID. 6.) Note the ID and configuration The ID lists the Type of template and the Configuration lists the specific template in that set. Any ID over 10000 is custom The out-of-box templates and configurations are noted in the links you provide, but the "STS" and other types were a bit confusing to me, so here is a different look at the standard template ID and configurations: ID 0 = Global, Configuration 0 = Global Template ID 1 = STS or SharePoint Team Site, Config 0 = Team Site ID 1, Config 1 = Blank Site ID
are SPWeb.WebTemplate and SPWeb.Configuration. WebTemplate property states what site definition the web uses. STS is the value for both the Team Site and Document Workspace templates. MPS is the value for Meeting Workspaces, etc. The Configuration property corresponds to the ID of the configuration of the site definition the web is using. Team Site's configuration
Creation of HTML tag property "ID" of generated controls SharePoint Hello, a custom webpart for WSS3.0 gets a HtmlControl InputHidden with the property .ID = "transfer". The InputHidden control is then generated inside the HTML of the WebPart, and when I look into the HTML source I find the appropriate HTML -tag with the following ID property: id = "ctl00_m_g_b32595c2_64b5_453d_a355_15d2e5b2c236_transfer" SharePoint added information to my ID which was just "transfer", I think to grant that the ID is unique in any case. Does anybody know where the added values of the ID property come from? Or how I can avoid that SharePoint changes the ID and let it be just An inserted JavaScript, also generated by the WebPart, shall be