1

We have custom Web Templates deployed in our SharePoint 2010 deployment. The web templates are have a custom DisplayCategory defined Elements.xml (let's say it's Foo). In central admin's Create Site Collection page (createsite.aspx), the Template Selection section all the sites are grouped under the Foo tab as expected.

Foo

Is it possible to make the Foo tab selected by default?

I've looked around, and the only option I found at the moment is adding some JavaScript code which would call javascript:GetWebTemplates('&Foo', 'context') after the page loads. This is obviously not an ideal solution, since it would require modifying createsite.aspx.

Note that regular subsite creation, which uses Silverlight, needs to stay the way it is, defaulting to All Categories.

3 Answers 3

1

Eugene,

You have several options for accomplishing what you want without compromising any of the built-in files.

My suggestion would be to use a DelegateControl to output the javascript, and make sure the DelegateControl only triggers when you are on the right page. I've written an article for SharePoint Magazine that explains how:

http://sharepointmagazine.net/articles/custom-page-security-using-sharepoint-delegate-controls

Another option if you don't want the other web templates to be available at all is simply to hide thenm for this site. I'm guessing that's not what you want, but if it is, feel free to add a new question and I can explain how to do so.

.b

0

There wouldn't be anyway to do this without making changes to the build-in pages/controls. (Which is a very bad idea). SharePoint will always display them in this order: {Built-In Types} | {Custom Template Groups} | Custom (for custom templates not in a custom group).

0

The option we considered to be the best one (most supported with least maintenance) was to customize the master page and add the JavaScript there. The JavaScript would then check which page it's on and call the JavaScript if appropriate.

However, the customer decided that it's not worth the effort to implement. There are more important things to spend time on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.