Hiding Web Parts on Enterprise Wiki Pages with SharePoint

It is a common developer’s practice in SharePoint to add web parts to pages and then hide them. Hiding web parts is useful when you want to add specific functionality to a page without displaying the web part. For example, you can add CSS to a page by inserting a Content Editor web part and adding CSS definitions within a style tag or JavaScript by inserting code within script tags. Hiding a web part is a relatively simple task also. All that is required is to check the “Hidden” checkbox in the Layout section of the Edit Web Part tool pane.

Content Editor Img

On occasion, you will find that the Hidden checkbox in the web part is grayed out. The option to hide web parts is effectively disabled in Enterprise Wiki pages, such as the pages found in the Site Pages library.

Content Editor Img2

Although you can use SharePoint Designer to hide web parts on a Wiki page, there is an easier, less risky way of doing it. By adding the query string parameter “?toolpaneview=2” to the URL and reloading the page, a tool pane appears that allows you to add a web part of your choice to the “bottom” web part zone of Enterprise Wiki pages.

Content Editor Img3

Content Editor Img4

The Hidden checkbox is now re-enabled, allowing you to hide the web part. The only caveat is that if you wish to view the hidden web part or edit its properties you will have to reload the page with the “?toolpaneview=2” query string.

January 8, 2014