0

I have requirement in which, if a user creates a sub-site in a sitecollection then community template feature should not be available to him or he should not be able to see it.

0

Go to Site Settings --> Page layouts and site templates (under Look and Feel)

In Subsite Templates section , select Subsites can only use the following site templates:

Add your templates and click OK.

enter image description here

  • Thanks, but those site collection have already been created and also there are many site collection – prabhat katoch Dec 14 '18 at 1:17
0

For SharePoint 2013, we can use the PowerShell below to achieve it.

$siteCollectionUrl="http://sp2013/sites/team"
$templateNamesToRemove = "COMMUNITY#0","COMMUNITYPORTAL#0"

Start-SPAssignment -Global
$web = Get-SPWeb $siteCollectionUrl

# get the existing web templates from the site that will be filtered down 
# 1033 is the locale id for English US (en-us), be sure to change to your locale 
$existingWebTemplates = $web.GetAvailableWebTemplates(1033) 
$newWebTemplates = New-Object "System.Collections.ObjectModel.Collection[Microsoft.SharePoint.SPWebTemplate]"

# filter existing web templates and only keep if in the list of template names to keep 
$newWebTemplates = $existingWebTemplates | Where-Object {$_.name -notin $templateNamesToRemove} 
$web.SetAvailableWebTemplates($newWebTemplates, 1033) 
$web.Update() 

Stop-SPAssignment -Global 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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