locked
How to determine what kind of site? RRS feed

  • Question

  • Got a bunch of sites that i've created over the course of testing sp 2007.  I want to recreate some of those sites on our production environment but i can remember what kind of sites some of them are, i.e. whether they are a Team, Collaboration, etc.  It seems to be determined by which features are activated but i'm not sure.  Is there a way to determine this? 
    • Edited by Mike Walsh FIN Saturday, June 5, 2010 5:47 AM How to determine added to Ttitle - otherwise could be 'waht kind of site di I use'
    • Moved by Mike Walsh FIN Saturday, June 5, 2010 5:48 AM admin q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Friday, June 4, 2010 8:49 PM

Answers

  • You should be able to use GetprojectSchema appended to your site URL, it should return some XML containing all the details

    http://myserver/sites/mysites/_vti_bin/owssvr.dll?Cmd=GetProjSchema

    Bill Simser has an interesting article about doing this and formatting the output:

    http://weblogs.asp.net/bsimser/archive/2006/01/04/434463.aspx

    Regards

    John Timney
    • Marked as answer by Paul Galvin Saturday, June 5, 2010 6:12 PM
    Friday, June 4, 2010 10:01 PM
  •  

    You could just go to each site and use Site Actions, Site Settings, Save Site as Template, then go the the template gallery, download the template. Then in production upload the template to the template gallery and then go to Site Actions, Create and create new "clones" of those sites.

     

    If you want to write a little code you can list the original template used:

     

    SPSite site = new SPSite("http://yourtoplevelsite");
    foreach (SPWeb w in site.AllWebs)
    {
     Console.WriteLine("Web: " + w.Url);
     Console.WriteLine(" Title: " + w.Title);
     Console.WriteLine(" Template " + w.WebTemplate);
     Console.WriteLine(" Template ID " + w.WebTemplateId);
     Console.WriteLine();
     w.Dispose();
    }
    site.Dispose();

     

    This will return something like this:

     

    Web: http://intranet
     Title: Gears Project Home
     Template STS
     Template ID 1
    
    Web: http://intranet/search
     Title: FAST Search Center
     Template SRCHCENTERFAST
     Template ID 2000
    
    Web: http://intranet/wiki
     Title: Wiki
     Template ENTERWIKI
     Template ID 56

     

    The first one for example is a Team Site (with an internal ID of STS#1)

    Here is a list of 2007 IDs (The Id is in the "Name" row of the list there):

    http://dotnetdeveloper.co.uk/blogs/sharepoint/archive/2009/07/07/sharepoint-template-id-s.aspx

     

     


    Mike Smith TechTrainingNotes.blogspot.com
    Friday, June 4, 2010 9:49 PM

All replies

  •  

    You could just go to each site and use Site Actions, Site Settings, Save Site as Template, then go the the template gallery, download the template. Then in production upload the template to the template gallery and then go to Site Actions, Create and create new "clones" of those sites.

     

    If you want to write a little code you can list the original template used:

     

    SPSite site = new SPSite("http://yourtoplevelsite");
    foreach (SPWeb w in site.AllWebs)
    {
     Console.WriteLine("Web: " + w.Url);
     Console.WriteLine(" Title: " + w.Title);
     Console.WriteLine(" Template " + w.WebTemplate);
     Console.WriteLine(" Template ID " + w.WebTemplateId);
     Console.WriteLine();
     w.Dispose();
    }
    site.Dispose();

     

    This will return something like this:

     

    Web: http://intranet
     Title: Gears Project Home
     Template STS
     Template ID 1
    
    Web: http://intranet/search
     Title: FAST Search Center
     Template SRCHCENTERFAST
     Template ID 2000
    
    Web: http://intranet/wiki
     Title: Wiki
     Template ENTERWIKI
     Template ID 56

     

    The first one for example is a Team Site (with an internal ID of STS#1)

    Here is a list of 2007 IDs (The Id is in the "Name" row of the list there):

    http://dotnetdeveloper.co.uk/blogs/sharepoint/archive/2009/07/07/sharepoint-template-id-s.aspx

     

     


    Mike Smith TechTrainingNotes.blogspot.com
    Friday, June 4, 2010 9:49 PM
  • You should be able to use GetprojectSchema appended to your site URL, it should return some XML containing all the details

    http://myserver/sites/mysites/_vti_bin/owssvr.dll?Cmd=GetProjSchema

    Bill Simser has an interesting article about doing this and formatting the output:

    http://weblogs.asp.net/bsimser/archive/2006/01/04/434463.aspx

    Regards

    John Timney
    • Marked as answer by Paul Galvin Saturday, June 5, 2010 6:12 PM
    Friday, June 4, 2010 10:01 PM
  • John,

    Very interesting! Thanks.

    Looks like that one goes back to the SP 2003 days, but still works.  (just did some checking... it goes all the way back to SP 1.0!)

     


    Mike Smith TechTrainingNotes.blogspot.com
    Saturday, June 5, 2010 12:09 AM
  • I think it still works in 2010 too :)

    Regards

    John Timney

    http://www.johntimney.com/blog

    Saturday, June 5, 2010 11:08 PM