1

enter image description hereI am trying to remove site contents link from left side navigation for a subsite and I am unable to do it via Masterpage. I have edited the Seattle.master master page from designer and set it as default master page but nothing works. I have commented the below codes

<div class="ms-core-listMenu-verticalBox">
                    <SharePoint:ClusteredSPLinkButton
                        runat="server"
                        id="idNavLinkViewAll"
                        PermissionsString="ManageWeb"
                        NavigateUrl="~site/_layouts/15/viewlsts.aspx"
                        Text="<%$Resources:wss,AllSiteContentMore%>"
                        ToolTip="<%$Resources:wss,AllSiteContentMore%>"
                        accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"
                        CssClass="ms-core-listMenu-item ms-core-listMenu-heading" />

and also tried this css but doesn't work either

<style type="text/css">
.ms-core-listMenu-item, .ms-core-listMenu-item:link, .ms-core-listMenu-item:visited, .ms-tv-item:link, .ms-tv-item:visited, .ms-tv-header:link, .ms-tv-header:visited {
    color: #666666;
    text-decoration: none;
    display: none;
} </style>

<style type="text/css">
     .ms-splinkbutton-text a[title="Site contents"] {display: none !important ;} 
</style>

I followed the instructions from link as well but it was of no use: Hide Site Contents Link from SharePoint 2013 Quick Launch

Please suggest a way to remove site contents link from left hand navigation.

1 Answer 1

1

You can try this in the master page. I tried on a Seattle masterpage and it worked.

<style> .ms-core-listMenu-verticalBox > a[title="Site Contents"] { display:none; } </style>

Update... check your master page settings...

enter image description here

6
  • Hi Kyle It is the subsite I am trying to work it on. I edited the seattle masterpage from the designer and piublsihed it to the site. But it is not reflecting on the site, Do I need to do any changes in the sitesettings?
    – SPLearner
    Aug 14, 2018 at 18:22
  • First lets confirm that the Seattle master page is indeed the master page of your subsite. If you go to the site settings (and publishing features are enabled), you should see an option for master page and should see whether seattle is the default selected. I will admit though when I did my test with the code above, I did it on the root of a publishing site collection. I did not try it out on a subsite. Aug 14, 2018 at 18:36
  • I have uploaded the screenshot of the masterpage from site settings, by default my subsite is inheriting from parent site master page. So i selected the seattle ,master page with second option but it doesnt reflect What I am trying to do here.
    – SPLearner
    Aug 14, 2018 at 18:44
  • Thank you for the screenshots. They do indeed confirm you have the correct masterpage. One last thing. When you load the page, can you either view source or hit F12 on your keyboard, and try to find the code you've entered. There are two possibilities. 1: The code is there and is not working. 2: The code is not there, and thus we are not seeing the correct version of the masterpage. Aug 14, 2018 at 18:49
  • Hi Kyle just checked with f12 and the code is not showing up . Do i have to go with different way to show the code ?
    – SPLearner
    Aug 14, 2018 at 19:10

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.