My career in technology

Want to restrict the types of sites your user base can create (assuming you let them have that kind of power)?

This is a quick and easy fix.

In the 12 hive (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\), in TEMPLATE\1033\XML is the WEBTEMP.XML file.

Open in your preferred text editor.

Say, for instance, that you want to prevent users from creating their own blog sites to centralize control of blogging and maintain a standardized review and approval process.

<Configuration ID="0" Title="Blog" Hidden="FALSE" ImageUrl="/_layouts/images/blogprev.png" Description="A site for a person or team to post ideas, observations, and expertise that site visitors can comment on." DisplayCategory="Collaboration" >    </Configuration>

Change “FALSE” to “TRUE”, and reset IIS. All done!

It works in reverse too… say you inherit an existing site and you can’t find a particular site template. It is possible that someone before you hid that template. Set “TRUE” to “FALSE”, and reset IIS.

More posts about SharePoint.


Comments on: "Hide a Site Template in SharePoint 2007" (6)

  1. Neal O'Kelly said:

    Thanks for sharing this.

    Does this mean though, that [in your particular example] the “blog” site type is hidden from ALL users, including Administrators? I’m looking to restrict the ability to create particular site types to particular users/groups.



    • Yes, it is hidden from everyone, including administrators (until you manually unhide it, after which you would use it and then manually hide it again).

      It occurs to me that you might be able to create a rights-limited site type (this is untested, just off the top of my head). Create a, for example, blog site. Save the site as a template. Then restrict access to the site template gallery, or to the individual site template (applying object-level permissions is NOT a best practice), and hide the base type in the xml as described. I am not currently aware of other ways to restrict access to particular site types.

  2. You can use the OOB tools in SharePoint by going to the http:///_Layouts/AreaTemplateSettings.aspx page to hide the site template and page layouts from end users.

    • Nice! This is why I don’t claim to know everything. This is a simpler way of handling it. Thanks, Scott!

      However, I just did a little poking around. When you remove the template using the procedure I described, the settings on the OOB tools show as “Subsites can use any site template”, even though the template has been removed.

      In a site with proper governance (see my current series on the subject) and training, removing the template as I describe wouldn’t be necessary, but you can see it would make the template unavailable to anyone given permissions to use the OOB tools.

      The specific problem I was addressing in my environment that prompted the post was that the template was missing and had been removed by the manner I described (business requirements had changed and the template was needed to be made available). The OOB tools would not have restored the template, because the template would not be available to the OOB tools.

      FYI to readers – “Page layouts and site templates” (the URL referenced by Scott) is found in Site Settings >> Look and Feel (4th item down). Which I should have known.

  3. For any one else visiting this site and finding this post, please be aware that modifying the WebTemp.XML file is illegal, and you will be thrown in jail (not really, but your sharepoint installation will be considered “Unsupported” – whatever that means). There are other means, as Scott pointed out, or in the case of Jim’s post, you can create a copy of the webtemp.xml file (renamed to something more useful, like webtempMyWebAppName.xml and modify that one… then you can hide the site templates in that file.

    • “Unsupported” means that, if you call MS with a tech support issue, you have to revert the WebTemp.XML file (or, in the case of other unsupported changes, undoing the unsupported changes) and demonstrating that the problem still exists.

      Yes, modifying the WEBTEMP.XML file is in fact unsupported.

      As I mentioned in my reply to Scott, I found out about this particular method of hiding a site template because it had been done in the environemnt I was managing before I was there. Once the business requirements had been changed, I had to figure out what had been done and undo it. Perhaps I should have titled the post “Can’t Find a Site Template in SP2007? Maybe It’s Hidden Here…”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: