示例#1
0
        private string LookupTemplateIDInDefinitions(SPSite site)
        {
            SPWebTemplateCollection templates = site.GetWebTemplates(LCID);

            foreach (SPWebTemplate template in templates)
            {
                if ((template.Name.ToLower() == TemplateName.ToLower()) || (template.Title.ToLower() == TemplateName.ToLower()))
                {
                    return(template.Name);
                }
            }
            return(string.Empty);
        }