Removing quick launch but keeping List Menu

Hi Everyone - I found the code below online to remove the quick launch but keep the top site navigation:

<style type="text/css">
#sideNavBox {DISPLAY: none}
#contentBox {MARGIN-LEFT: 5px}
</style>

It works great on the home page, however, when I add it to a list page (allitems.aspx) it also removes the List/Items options at the top of the page.  Any idea how I can tweak this code so it keeps that info on the list view pages?

June 19th, 2015 8:57pm

Hi Michelle,

This should work for you

https://social.technet.microsoft.com/Forums/office/en-US/5d9dc87c-29ab-4460-bfbf-b2547a891863/removing-quick-launch-but-keeping-list-menu?forum=sharepointdevelopment

Free Windows Admin Tool Kit Click here and download it now
June 19th, 2015 9:04pm

The link your provided just takes me to my question!
June 19th, 2015 9:11pm

Hi,

Are you using SharePoint default master page or a custom master page of your own? I think if you are using SharePoint default masterpage then the code should work, in both home page as well as page layout. But if you have custom master page as well custom branding, it's quite difficult to suggest without knowing the customization.

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 1:38am

Hi 

Put the code in system master page,this applies to all administrative page. 

you can find the system master page in site setting >> look and feel >> master page 

June 22nd, 2015 2:16am

Hi there -

I should have been more specific!  I added a script web part to my home.aspx page and each of my list pages to remove the quick launch from all of the pages.

I can see the master pages when navigate to where you said but I don't know how to edit them.  Do I need to use SharePoint designer?  If so, where exactly do I put the code?  I usually just do most of my edits through the UI since I don't know code very well.

thank you!

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 12:54pm

Hi

You have to use Sharepoint designer /or you can download the file ,make changes and again upload in master page gallery.

here is the link

http://blog.pixelmill.com/1307/sharepoint-2013-tricks-inline-styles/

June 22nd, 2015 1:29pm

Hi Michelle,

The code you tried should work fine in hiding the Left navigation and keeping the s4-Title row visible. In case if List/Items are hiding, please add 

#s4-ribbonrow{display:block !important} 

below the #contentbox and check

Thanks.

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 1:44pm

Still does not work. I have added this in the snippet:

<style type="text/css">
 #sideNavBox {DISPLAY: none}
 #contentBox {MARGIN-LEFT: 5px}
#s4-ribbonrow{display:block !important}
</style>

On a document library page and a list page but I don't see the "Library" or "List" menu items at the top

June 22nd, 2015 2:10pm

Hi 

if you want to make changes across the site,you have to add the style in master pages.

else you have to manually add into every single page present in the web.

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 2:15pm

Hi Michelle,

Per my understanding, when applying the code above in a list view page via a Script Editor Web Part, the List and Items tabs in the ribbon disappear.

When there is other web part in the OOTB list view page, after the page loaded for the first time, the focus will not on the list view web part by default, accordingly, the List and Items tabs in the ribbon will not show up.

To overcome it, a workaround is that you can modify the AllItems.aspx page of this list in SharePoint Designer directly instead of inserting a Script Editor Web Part into the page through UI.

This is how it works if adding the CSS code above into the list view page via SharePoint Designer 2013:

About how to add code into page using SharePoint Designer:

http://techtrainingnotes.blogspot.com/2012/05/adding-javascript-and-css-to-sharepoint.html

Thanks
June 23rd, 2015 4:26am

Yes, that is exactly what I want it to do!  How can I tell what master page to edit if I want it on all pages? I have 4 master pages in designer.

First I will try on an .aspx page to make sure it works for me :)

Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2015 9:19am

Hi Michelle, 

You can find the master page in use currently by following the link below:

https://msdn.microsoft.com/en-us/library/office/jj862339.aspx

Thanks
June 23rd, 2015 10:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics