Displaying Metadata Navigation while HIding Quick Launch

Silver Contributor

In SPO, how can we hide the quick launch when the Metadata navigation controls are enabled for a document library. In 2010, we could edit the Master Page but I would rather not do that in SPO.

4 Replies

The only other way I know of for hiding quick launch conditionally is via jQuery.

 

If jQuery is enabled on the site, you could drop some jQuery into a snippet webpart on the library view page.

 

Something like this would do what you are looking for:

 

 

<script>
if ($('.ms-tv-box').length)
{
   $('.ms-core-sideNavBox-removeLeftMargin').find('div').first().hide();
}
</script>

 Edit: I should mention, this works on classic libraries, not modern. Added the word "conditionally".

Thanks, but when I try that, the Metadata navigation controls don't show up either.

You can try 'Remove-SPONavigationNode' using pnp powershell. 

 

Remove-SPONavigationNode -Title spoapp1 -Location QuickLaunch -Header Teams