SharePoint User Group UK

Share the knowledge!

Welcome to SharePoint User Group UK Sign in | Join | Help
in
Home Blogs Forums Photos Files Roller

Page Layout and Site Template Settings - Order of Site Templates

Last post 05-01-2012, 12:27 PM by mikebirty. 2 replies.
Sort Posts: Previous Next
  •  04-18-2012, 1:53 PM 28662

    Page Layout and Site Template Settings - Order of Site Templates

    Hiya,

    I have two custom site templates that work fine and I have no problems with. One is called "Default Site" and the other is called "Meeting Site".

    When I add them both to "Available Templates" they always appear
    1. Meeting Site
    2. Default Site
    They stay in that order everywhere, it doesn't matter if you use the Create silverlight control, the 2007-style web page or the GetAvailableWebTemplates() command in Powershell.

    Because of this, when you click Site Actions > New Site the Silverlight control comes up with the Meeting Site selected as default. This has caused people to accidentally create meeting sites which wastes time.

    I can't find out how SharePoint determines this order. Its not by the long name of the template, or the title of the template or by the template ID from webtemp_zzz.xml. The default search in the top left of that pop up is to sort by Type. If you click by title, they sort alphabetically.

    OK, so at this point I'm assuming I'm assuming that there's some hidden field / database ID that are sorting them into this order. This is where it gets strange......

    When I add in a dozen or so extra templates the order switches around. So you've got, for example:
    Blog
    Issues Web
    Publishing
    Basic Search
    ***Default Site***
    Enterprise Search
    Enterprise Wiki
    Multipage Meeting
    Publishing Site with Worklow
    ***Meeting Site***

    So this is starting to drive me mad. The ordering seems to be randomly determined but always in the same random order - if that makes sense.

    Does anyone have any idea as to how this order is determined?

    Mke
  •  04-27-2012, 3:22 PM 28681 in reply to 28662

    Re: Page Layout and Site Template Settings - Order of Site Templates

    if you can code then wrap this in a feature

    http://blogs.msdn.com/b/maximeb/archive/2008/08/20/how-to-sort-the-list-of-sites-in-the-create-sites-page.aspx


    Dave Nixon
    SharePoint UK Blog
  •  05-01-2012, 12:27 PM 28692 in reply to 28681

    Re: Page Layout and Site Template Settings - Order of Site Templates

    What a brilliant find! Thank you so much.

    Although I do wish I hadn't read this 4 hours before my holiday.... must write code fast.....
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems