Share via


Changing the CreateSite page

After seeing the templateID detail (blogs.msdn.com/dwinter/archive/2006/07/07/659613.aspx) ChrisF wanted to know if there was an ID associated with the Custom Tab that shows up on the Create New Page.  He was trying to make that tab the default tab that shows up.  Here is my response:

If you look at ...\12\TEMPLATE\ADMIN\createsite.aspx, you'll see that dialog is simply represented by:
    <wssuc:TemplatePickerControl id="InputFormTemplatePickerControl" runat="server" ShowSubWebOnly="false" ShowCustomTemplates="false" />
Look at the definition of wssuc:TemplatePickerControl in the Register directives at the top of the page and you'll find that it is comming from ~/_controltemplates/TemplatePickerControl.ascx.  Go open that (its in: ...\12\TEMPLATE\CONTROLTEMPLATES) and you'll see this:
    <input type="hidden" ID="HiddenSelectedCategory" value="" runat="server"/>
You might think that you could make this something like:
    <input type="hidden" ID="HiddenSelectedCategory" value="Publishing" runat="server"/>
however, the hidden tag is used only on postback--so it won't help you on page load.

Your only real answer here is to use querystrings on the inbound URL.  If you browse to createsite.aspx with a DisplayCategory querystring, the control will filter.  For example:
   
Alternatively, if you browse to createsite.aspx with an ID querystring, the control will also filter.  For example:
   
will just show MPS configurations, and:
   
will show the Collaboration Portal as the only choice.

Now your next question (and what ChrisF was getting at) is--how do I make the UI do this?  The answer, edit the ...\12\TEMPLATE\FEATURES\AdminLinks\Applications.xml
Look for CreateSite, you will see:
       <UrlAction
           Url="/_admin/createsite.aspx" />
Make this (for example):
       <UrlAction
           Url="/_admin/createsite.aspx?DisplayCategory=Publishing" />

Save it and refresh the page.  You'll see the link is now updated.  
Now I have to throw out the disclaimer that this modification may need to be redone/removed with a servicepack, hotfix, or upgrade to o14 (make sure you let CSS know you made this change if you call with an issue with Central Admin).  However, if you decide to accept the risk associated with this kind of change, yes you can make it happen.

Comments

  • Anonymous
    January 04, 2007
    The comment has been removed

  • Anonymous
    January 04, 2007
    Forgot to mention that this is for MOSS 2007

  • Anonymous
    January 07, 2007
    The comment has been removed

  • Anonymous
    January 22, 2007
    Thanks for the help.  I should have said it in my post but the page that I was having the problem with was actually newsbweb.aspx with MOSS 2007.  I was able to apply what you said in the post to my page and it works like a champ.  I knew it had to be something easy that I was looking over. Might I ask you a follow up question.  With regards to the Custom Tab on newsbweb.aspx using MOSS 2007.  Is there a way to rename the Custom Tab and to have a different image show up when a custom template is choosen?  I know that is you go into the webtemp.xml file you are able to make changes to the pre-exisiting templates but I can find no reference to the Custom Template.  I'm thinking that it might be the the database some where but can't find it as well. Thanks for all the help..

  • Anonymous
    January 26, 2007
    This seems to work for newsbweb.aspx.   function setCustom() {   GetWebTemplates('1033&Custom', 'context'); } setTimeout("setCustom();", 200);

  • Anonymous
    April 03, 2008
    Hello all, I need some help!! When working with calendars there is an option to create �Meeting Workspaces�. When you click on this you could select from a list of Meeting workspaces templates (these templates seem to have a different id than regular sites or document workspaces). I need to make a document workspace template available in the meeting template list, is that possible? Secondly, how can I do that? _layouts/templatepick.aspx?FieldSource=WorkspaceLink&CPLinkSource=Workspace&List=%7b68401D7B-DBF2-459F-92FF-669B0192074D%7d&Item=14&ID=2&Web=/programs Thanks, Lola

  • Anonymous
    October 17, 2010
    Hi Guys, My Requirement is: I have an page it's coming from _Layouts,that page contains one Template Picker Control(share point control).so it showing all site templates like Team site,Wiki site etc. But My Issue is i have site template id like "STS#1" Now i need to show  this site template in  Template Picker Control using c# or Object model code.how to do that right know it selected  Default site template. Now I am using Javascript for the above task using GetWebTemplate('1033&Meetings',''); using the above code I'm able to set the tab 'meetings' But How would I select a particular template under the meeting Tab. Thanks in Advance Muralikrishna.T