1

I've applied a custom web template in a site.

How to retrieve the template title based on site url in c#?

FYI: My Custom Web Template name is "{guid}#MyNewTemplate" and title is "MyNewTemplate", basically it is a team site.

Note: I've also checked related questions in StackExchange but none worked for me to get the desired result, mostly it returns 'team site' title rather than my custom web template title

I would like to find the custom web template title. Please Help me out here

Thanks

1 Answer 1

0

You can use either;

SPWeb.WebTemplate

to get the Web Template name, or;

SPWeb.WebTemplateId

to get the Web Template ID

See the properties exposed by the SPWeb object on MSDN

2
  • Thanks for your reply. According to your suggestion, I will be getting only "STS#0" which is my basetemplate details. But I'm looking for custom template name and title.
    – SPUser
    Commented Feb 18, 2016 at 15:28
  • This will give you the custom template name and title? "STS#0" is the template for a team site Commented Feb 18, 2016 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.