Monday, January 19, 2015

SharePoint 2007 - Hiding the Navigation

Scenario:
I had a small requirement to hide left and top navigation from a SharePoint 2007 Publishing Site on just one page (not the whole site).

Solution:
Two line javascrpit :o) in a hidden Content Editor Web Part, after identifying the IDs of the HTML elements which render the navigation.
<script type="text/javascript">

document.getElementById('onetIdTopNavBarContainer').style.display = 'none';
document.getElementById('LeftNavigationAreaCell').style.display = 'none';

</script>

No comments:

Post a Comment

Official SharePoint Documentation

I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...