Friday, December 28, 2012

Hide Site Templates in SharePoint 2010


Client requirement: Users must only be able to select a custom site template when creating new sites/sub-sites.


Modify WebTemp.xml on One of the SharePoint Servers in Farm

On one of the WFE or App servers in the SharePoint farm:
  • Make a copy of C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\WebTemp.XML
  • Verify you made a copy of C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\WebTemp.XML
  • Edit C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\WebTemp.XML
  • Locate the template you wish to hide (ex: the following section is for the Team Site template):
<Configuration ID="0" Title="Team Site" hidden="FALSE" ImageUrl="/_layouts/images/stts.png" Description="A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions." DisplayCategory="Collaboration" > </Configuration>
  • Change the ‘hidden’ variable from “FALSE” to “TRUE”
<Configuration ID="0" Title="Team Site" hidden="TRUE" ImageUrl="/_layouts/images/stts.png" Description="A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions." DisplayCategory="Collaboration" > </Configuration>

Copy Webtemp.xml to All Servers in Farm

On the remaining SharePoint servers in the farm:
  • Rename C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\WebTemp.XML to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\WebTemp-COPY.XML
  • Copy your newly edited C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML\WebTemp.XML to the same path on each additional server in farm 

No comments:

Post a Comment