Quick Fix: Remove Libraries, Lists From ToC
I usually strive to first and foremost use SharePoint’s out of the box functionality to fulfil clients’ needs. Custom solutions with managed code, controlled deployment etc. are all well and good but sometimes you can get by with some simple frontend-configuration. This approach, if done right, enables clients to easier maintain and further enhance their SharePoint site once it’s up and running and the expensive SharePoint consultants have left the building.
Anyway, let’s skip the politics and get to the point of this post.
When you insert a standard Table of Contents web part it looks something like this:
And if you’re like most of my clients, you want it to look like this:
I.e. more “site mappy” without links to lists, document libraries and discussions.
First, create a library in the site to hold custom scripts. Why not call it “scripts”?
For easy editing, open the the new library in explorer view and create a text file, like so:
Save the file and go back to the SharePoint page where you placed the ToC web part. Below the ToC insert a Content Editor Web Part.
Click OK and save the page. The unwanted nodes are now hidden.
I’m fully aware of the implications of the above approach with regards to solution management, client-side performance and so on, but every solution needs to be seen in the context of the need it fulfils. And sometimes the above approach hits the mark.
And remember, the Table of Contents web part is just one of site navigation options in SharePoint.
Subscribe to comments with RSS.