3

We have a specific requirement, where we have to create dedicated site collection for hosting discussion boards. How we can disable all list and library templates and level only discussions, so users can only create those?

3 Answers 3

2

There is no way to disable the ListTemplates in a Site Collection.

So I'd do the following:

  1. Hide the following SiteActions menuitems (this can be done by removing them from the Masterpage or by implementing a custom action and web control like this)
    1. CreateDocLib
    2. CreateSite
    3. Create
  2. Create a menu item to my own page to create a Discussion board
  3. Implement a EventHandler to cancel ListAdding (if not discussion board) and WebAdding
1

The lists (including OOB) are installed via features (OOB features are hidden) and activated when you create team sites or any other sites.

How about just disabling the features associated with the lists/doc library that you do not want to use. Below will list all the features.

$web = Get-SPWeb "http://site"
$site = Get-SPSite "http://site"

$web.Features | ForEach-Object {
  Write-Host $_.Definition.Id "---" $_.Definition.DisplayName
}
Write-Host "------------------------------"

$site.Features | ForEach-Object {
  Write-Host $_.Definition.Id "---" $_.Definition.DisplayName
}
0

Please see this similar question for list templates: Hide Listtemplate from Create Dialog in PowerShell

For site templates the procedure is similar. Navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML and locate the site template in either webtemp.xml or webtempsps.xml and change Hidden="TRUE" to Hidden="FALSE" and then perform an IISRESET. Likely a good idea to make a copy of these files before you change them.

1
  • I just noticed this is a question at the site collection level... I am really not sure if that is possible. Mar 24, 2012 at 14:25

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.