How can i get name of the site definition configuration or site template from SPWeb?
-
06-12-2019 - |
题
I know that SPWeb have "WebTemplate" property and it always gives me string like "STS" or "MPS", but what I need is something like "STS#1". There is also "WebTemplateId" property, it gives WebTemplate Enumeration, which isn't useful for me.
解决方案
You can get WebTemplate and Configuration properties, then use string.format("{0}#{1}", web.WebTemplate, web.Configuration )
.