SPWeb.SetAvailableWebTemplates restricts New Saved Site Templates from showing up in Custom Tab

I'm developing a site provisioning solution in SharePoint 2013 and one of the requirements is to restrict the available sub sites that show up when a user creates a new sub site. 

I was able to do this programmatically using SPWeb.SetAvailableWebTemplates() method. However, after running this method the following behavior was noticed.

A user saves a site as template from the browser by going to Site Settings and clicking  "Save Site As Template". The site gets successfully saved as template in Solutions gallery. However, the "Custom" tab does not appear in the New Subsite creation page. Is there a workaround or solution to get the Custom Tab and its sites back? 

January 9th, 2014 11:47pm


According to your post, my understanding is that you want to show the specific site templates when a user create a new sub site.

We dont need to do with code, there is already an OOTB feature for this.

We can go to Site Settings -> Page Layout and Site Template Settings.

In Subsite Templates, we can select Subsites can only use the following site templates:, then we can restrict the sub sites showing up when a user create a new sub site.


If you want to use code to achieve it, the following link for your reference:


Best Regards

Free Windows Admin Tool Kit Click here and download it now
January 13th, 2014 4:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics