in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

Adding navigation programmatically - sub-sub nodes added but not visible?

Last post 07-07-2008 5:51 AM by chetanyajain. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-17-2007 1:16 PM

    Adding navigation programmatically - sub-sub nodes added but not visible?

     Following the lead of many (eg http://blogs.msdn.com/sharepoint/archive/2007/04/26/customizing-the-quick-launch-menu-adding-fly-out-menus-to-sharepoint-navigation.aspx) I want to control the items in my navigation (top link bar and quick launch). To do this I turn *off* "show sub-sites" and manually (i.e. programatically) add the navigation nodes I want back into the toplinkbar and quicklaunch navigation items for a site.

     However, although I have my master page edited to show enough sub-items in the flyouts, it only ever shows one level. The question is - how are these navigation nodes being trimmed? And what do I set when adding them to allow them to show? Or is it a setting in default.master that isn't shown that I need to add?

    I have added menu items called "Sites" to both the top link bar and the quicklaunch (and hidden all others), and added my site navigation nodes under these headings. I've then added the sub-sites of those sites as child nodes so that I now have 3 levels of navigation nodes (heading->Site->Sub-Site). I want these to appear as flyouts in the same way that the views appeared as sub-items of the document library flyouts in the blog I mentioned above.

    Just to verify that I have added things correctly, my program reads the navigation back from sharepoint and writes it to a treeview control - and sure enough, my navigation nodes all have the requisite sub-nodes, but the sub nodes are not showing up on the navigation.

    Now, just to verify that my master page is correctly (?) customized, I went through my sites and switched on "show sub-sites" in the navigation options. Now my main page has an entry for each site, and each subsite appears in a flyout, and if those sub-sites themselves have sub-sites, they do appear as third level flyout items - so why don't my programatically added navigation nodes show up?

    There seems to be some property of a navigation nodes that either the SiteMapProvider or the DataSource is using to trim navigation nodes which I need to control to allow them to show up, but I can find no documentation that covers this.

    Any suggestions would be very welcome - banging head against desk at the moment!

    Ron
     

  • 07-07-2008 5:51 AM In reply to

    Re: Adding navigation programmatically - sub-sub nodes added but not visible?

    Check "NodeTypes" Property. (Microsoft.SharePoint.Publishing)

Page 1 of 1 (2 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.