Tuesday 7 January 2014

Hide Edit Page Link From Site Actions Menu

If you have a requirement to hide a link from site actions menu, for example, the edit page link, you can use SharePoint designer instead of creating a custom code.

Here are the steps on how to hide edit page link from site actions menu of a SharePoint site:

1. Open the site using SharePoint Designer.
2. Go to _catalogs >> masterpage.
3. Check out and edit default.master page.
4. Find the below code from the page:

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
Text="<%$Resources:wss,siteactions_editpage%>"
            Description="<%$Resources:wss,siteactions_editpagedescription%>"
            ImageUrl="/_layouts/images/ActionsEditPage.gif"
            MenuGroupId="100"
            Sequence="200"
            ClientOnClickNavigateUrl="javascript:MSOLayout_ChangeLayoutMode(false);" />


and then add the following lines on it:

PermissionsString="ManageSubwebs"
PermissionMode="Any"


The code should now look like:

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
            Text="<%$Resources:wss,siteactions_editpage%>"
            Description="<%$Resources:wss,siteactions_editpagedescription%>"
            ImageUrl="/_layouts/images/ActionsEditPage.gif"
            MenuGroupId="100"
            Sequence="200"

            ClientOnClickNavigateUrl="javascript:MSOLayout_ChangeLayoutMode(false);"
            PermissionsString="ManageSubwebs"
            PermissionMode="Any" />


5.  Save and check in default.master page.


 

No comments:

Post a Comment