Pergunta

Is it possible to find out the ID of a custom site template without using powershell? Using Sharepoint 2010 project in office 365 and I do not have access to the server.

Found a blog post claimining you should be able to find the template ID in by simply viewing source on a site created with that template, however I checked out the source of a teamsite and a blank site and didn't find any occurances of the string 'siteTemplateId' at all http://brulan.wordpress.com/2010/08/27/question-how-do-i-find-out-the-template-id-for-an-existing-sharepoint-site/

Any other way?

Foi útil?

Solução

It should work with right-click and view source.

Here is from a random team site I just tested on:

var g_wsaSiteTemplateId = 'STS#1';

Outras dicas

The SiteTemplateId shown above is the SiteTemplateId of the OOTB template used to create the site, this does not work for sites created via Custom templates. If you view the SiteTemplateId in the Custom template, you would still see the SiteTemplateId if the OOTB template not the Custom template.

You can. I still found no answer elsewhere in the Net, so: And it's a ugly road to go there, but I'll try to guide you:

  1. Goto Site Settings / Top Level Site Settings / Solutions
  2. Click on the solution's link and download the *.wsp file e.g. to a local drive
  3. Rename the file to *.cab (actually it's a compressed CAB Format)
  4. Uncompress with any software that handles this Format (e.g. 7zip)
  5. A Folder structure with several subdirectories is generated.
  6. Open sub folder WebTemplate
  7. Open file Feature.xml
  8. You shoud see s.th. like Title="Web Template feature of exported web template " Id**="{5003ced0-ddc8-41ba-82e7-4559638d41da}**"> Cheers, Matthias

Using Google Chrome, navigate as though you were creating a new site based on your custom template. When you get to template selection, custom and your custom site template. Highlight it and then right click and choose inspect. You will see something that resembles this highlighted in the inspection panel.

Commercial Legal Site Template

So the above the template would be '{6482FF55-0C8E-4176-A8C2-7D620CD9E6C8}#Commercial Legal'

I use this all the time to script creating sites with PowerShell in SharePoint Online.

Just as an adage to do the same on premise use the following just change the site collection URL

Add-PsSnapin Microsoft.SharePoint.PowerShell

The following is the URL for the source Site Collection please adjust accordingly

$url = “http://yoururl” $site= new-Object Microsoft.SharePoint.SPSite($url ) $loc= [System.Int32]::Parse(1033) $templates= $site.GetWebTemplates($loc)

foreach ($child in $templates){ write-host $child.Name ”#” $child.Title}

foreach ($child in $templates){ write-host $child.Name}

Here is a nice article that explain very simply how to get the template ID.

https://jamesdiblasi.wordpress.com/2013/08/17/sharepoint-2013-finding-your-custom-site-template-id/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top