6

I have a top navigation on my home page which holds links to subsites.
Only on the top navigation on the home page, it shows a link called "Edit links" at the end of the navigation. Upon clicking it, one can edit the links in the navigation.

The thing is that I don't want this to be there, this "Edit links" option.

All subsites inherit this top navigation, yet the subsites do not show the "Edit links" link. What do I need to do in order to get rid of the "Edit links" option for the home page?
Should I edit the master page of the home page? Or is there another way to do this?

3

There might be an easier way, but I was able to hide it by adding the following lines to the masterpage:

<style type="text/css">
#DeltaTopNavigation .ms-core-listMenu-root .ms-listMenu-editLink {display: none;}
</style>

Hope that helps.

5

The reason there is an Edit Links hyperlink there is because you have the permission to do so, most likely by have the Design permission. If your users do not have that permission level access, they will not see the link.

Also, when creating a subsite, there is an option to display the subsite on the parent's horizontal navigation, you may deselect the option so that your subsite does not appear on the parent site.

If by all means, you must remove that even for people with Design or higher permissions, then you may implement the many suggested CSS. For my implementation, I would use:

<style type="text/css">
    #DeltaTopNavigation > .ms-navedit-editArea
    {
        display: none;
    }
</style>

DeltaTopNavigation is the ID belonging to the div holding all the links of the top horizontal navigation.

ms-navedit-editArea is the class used on a list item for any of the Edit links within a navigation.

The CSS does the following: Look for the element with ID DeltaTopNavigation, then look for the child elements which contains a classname of ms-navedit-editArea, and remove from display.

1
<style>
.ms-listMenu-editLink
{
display: none;
}
</style>

The above stylesheet will hide the Edit Link from Menu.

  • 1
    Please provide detailed answer and if not applicable add few lines to explain the answer. I think there are already many answers given this , so please provide answers to many other questions that might need answers and help the community in positive way, welcome aboard! – John Zachariah Aug 28 '17 at 4:59
0

Quickest and easiest way I found to remove the edit links option was by adding the Script Editor web part, then placing this code in it:

<style>
 .ms-displayInlineBlock{
       display: none;
 }
</style>

Hope that helps.

  • Hello Anon, I'm not sure that hiding all the elements with class "ms-displayInlineBlock" is accurate : there could be some others elements having this class. I think that targetting the right element by naming its parent is more accurate (see @balownee answer) – Gaelle Aug 29 '16 at 8:16
-1
<style>
.ms-listMenu-editLink
{
    display: none;
}
</style>

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.