Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Custom Template (.stp) name or id in SDK?

  Asked By: Denny    Date: Apr 19    Category: Sharepoint    Views: 1320

I have created a custom site template and installed the stp file via stsadm. Does anyone have any ideas on how to retrieve the id (i.e. _GLOBAL_#1) in code? If I try to use the SDK then I only get the base template id back (i.e. STS) and not the actual STP template. Anyone have any ideas on how I could retrieve it?



2 Answers Found

Answer #1    Answered By: Daron Oneill     Answered On: Apr 19

The template  a site  was created  with is not stored in the site. Are you just trying to use the user site template or are you trying to fetch it back  from a site?

Answer #2    Answered By: M Juarez     Answered On: Apr 19

You can only retrieve custom  templates. Use the ListCustomGlobalWebTemplates method of the SPGlobalAdmin class. It returns a string with the name, LCID, ID and description for each global site  template. Note that you cannot retrieve  templates that you create with custom sitedefs as they’re not in this group.

Didn't find what you were looking for? Find more on Custom Template (.stp) name or id in SDK? Or get search suggestion and latest updates.