Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using the built-in navigation TreeView provided at the site level in SP2010 to display a tree-view to users for navigation.

In addition, I am using the Metadata navigation feature on my lists, to allow users to navigate based on metadata, instead of only folders.

This is working perfectly fine in the sidebar of the site.

My question is whether it's possible to embed the same navigation Treeview inside a page - for example the home page of the site.

(Side note: I'm using plain regular SP2010, without any customizations, and would prefer not using a third-party webpart - these usually don't support metadata navigation anyway)

share|improve this question

1 Answer 1

Actually, the navigation tree is a ASP:Treeview control connected to a "navigation provider", which is the actual source of information. By opening the v4.master something as in the PlaceHolderLeftNavBar you could find:

<asp:TreeView runat="server" DataSourceID="MyDatasource" ExpandDepth="0"></asp:TreeView>

If you look then for the another control having ID="MyDataSource" (the actual name is different, bottom line is that whatever is mentioned in the DataSourceID it represents the component which is the data source), as is a little different for Collaboration vs. Publishing sites, it might be:

 <PublishingNavigation:PortalSiteMapDataSource ID="MyDatasource"
    runat="server" SiteMapProvider="CurrentSiteMapProviderNoEncode"/>

The main challenge is how to include it, and using SharePoint Designer is one way to go, if you want a no-code solution. Of course, the main issue with this approach is reusability, in case you plan to use it across multiple pages.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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