2

in a host named site collection using the team template, I would like to hide the Site Contents link, but cannot find any way to do it. does anyone know how?

deleting it from quick launch editor does not work. any solution relying on _layouts/15/ChangeSiteMasterPage.aspx does not work - the page does not exist or is not reachable. being able to edit site master page settings would be very useful as I could then add alternate css.

removing the link entirely is an acceptable option, although a better one would be to hide it only for non-admin users.

sharepoint 2013 sp1 enterprise farm, sql server 2012, windows server 2012 r2

  • Hiding Site Contents is easier on Publishing sites. Why do you have to do this on a Team Site? It might hinder user productivity which is not the purpose of SharePoint in general ;-) – Alexey Krasheninnikov Nov 18 '14 at 16:12
3

One option is to use CSS so you're not messing with the masterpage:

#sideNav { display: none; }

You may have to add !important to make sure it overrides the master CSS file.

#sideNav { display: none !important; }
  • 1
    #DeltaPlaceHolderLeftNavBar span.ms-splinkbutton-text { display: none; } – Iman Abidi May 9 '16 at 8:36
  • Thats another way of doing it. But can't the deltaplaceholder name change with master page updates? – A Dahlman May 17 '16 at 19:21
1

the following solution worked by editing the seattle.master page according to this link: https://social.technet.microsoft.com/Forums/office/en-US/5d30118a-8be7-4ed7-9f0d-b40ecf1054fd/a-menu-item-called-site-contents-on-the-left-site-menu-of-my-site?forum=sharepointgeneral. basically I simply commented out the following code

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

it would be nice to add javascript and jquery to a page as I am sure that will be required for future modifications.

  • Rather than editing the master page, consider adding a Delegate Control via a feature and override this control with a security trimmed version. – Alexey Krasheninnikov Nov 18 '14 at 16:15
1

I find targeting the CSS title directly works well

.ms-core-listMenu-verticalBox a[title="Site contents"] {display: none;}
0

Add this to page script in SharePoint designer

$(document).ready(function() {
    $('.ms-core-sideNavBox-removeLeftMargin').children()[1].style.display="none" 
});
  • I tried doing this but it locked up my page which I then had to restore from a previous version. I added a script editor webpart, then inserted the jquery. when that didn't work, I added javascript tags around the code - that's when it locked up. what am I doing wrong? do I need to include a jquery library reference as well? – tony bonn Nov 18 '14 at 15:49
  • 1
    Yes you need a jQuery (or mQuery) reference for this to work. And while using jQuery, then why not .hide() or .remove() rather than [1].style.display="none"? – Alexey Krasheninnikov Nov 18 '14 at 16:10

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.