Udostępnij za pośrednictwem


How To: Hide the "Delete this site" link from the site settings page

You can use a custom feature to hide the link.

Below is a sample Feature.xml (please note the current scoped of this feature is set to the Farm level and can easily be changed)
<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="DB251596-8825-4831-B338-1CE515955ECF"
          Title="RemoveDeleteSite"
          Description="RemoveDeleteSite"
          Version="12.0.0.0"
          Hidden="TRUE"
          Scope="Farm"
          DefaultResourceFile="core"
          xmlns="<https://schemas.microsoft.com/sharepoint/>">
    <ElementManifests>
        <ElementManifest Location="SiteSettings.xml" />
    </ElementManifests>
</Feature>

 

This is what the SiteSettings.xml referenced in the Feature.xml would need to look like
<?xml version="1.0" encoding="utf-8"?>
<Elements
    xmlns="<https://schemas.microsoft.com/sharepoint/>">
    <HideCustomAction
        GroupId="SiteAdministration"
        HideActionId = "DeleteWeb"
        Id="DeleteWeb"
        Location="Microsoft.SharePoint.SiteSettings"
       />
</Elements>

Comments

  • Anonymous
    July 08, 2011
    How do you restore the link?

  • Anonymous
    August 25, 2011
    We are not able to hide the Site "Web Analytics reports" link in the same way. Please advice.

  • Anonymous
    August 25, 2011
    I am not able to hide the "Site Web Analytics reports" in the above mentioned procedure. Please advice.

  • Anonymous
    August 29, 2012
    Change the GroupId to "SiteTasks" which worked for me.