I'm experimenting with providing maximum functionality without writing code.

The sharepoint site collection has one sub-site called "Demo". "Demo" has one document library called "Testing".

I've enabled Tree View in "Look-and-Feel" and can see the site navigation in the Quick Launch. The tree-view thus created uses "SPHierarchyDataSourceControl" for the site data. I want to modify this tree view so that it only displays the Document Library "Testing" with its sub-folders.

As mentioned earlier, I do not want to use third-party webparts or write code. I want to edit only the master page to achieve the output.

Is it possible?

1 Answer 1


I think you can set the RootContext of the SPHierarchyDataSourceControl to List instead of Web, and also you can set the RootListId to the guid of your list (an easy way to get the guid from a list is to look in the URL when you are in document properties:

  • I haven't been able to test this. But I think you are right.
    – Anurag
    Commented Jan 31, 2011 at 7:18
  • Hi Anders, can I show the same as a web part ? Means I don't want the tree structure to appear in the left hand quick view section, Can I show it on the body? though +1 for this great idea :)
    – Jithu
    Commented Nov 24, 2011 at 9:59
  • Its a control, so if you need it in a webpart you will need to include the control in a webpart, for example a visual web part Commented Nov 24, 2011 at 17:39
  • There is no "RootListId" in the page. Is it required to be created and placed somewhere close?
    – Regmi
    Commented Dec 1, 2011 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.