Sharepoint - Navigation.QuickLaunch has missing items

Posted by linqmonkey on Stack Overflow See other posts from Stack Overflow or by linqmonkey
Published on 2010-03-24T17:54:28Z Indexed on 2010/03/25 9:13 UTC
Read the original article Hit count: 421

The following code generates an ASCII art tree view of a sharepoint site structure based on the items in the quick launch menu. But some are missing.

From googling i've found suggestions that this may be because QuickLaunch only contains items that have been customised.

Any idea how to fix this? I want to use the QuickLaunch items as many of the sites have subsites and pages that need to be displayed in a specific order.

    RecurseNavigation(SPWeb web)
    {
        depth++;
        foreach (SPNavigationNode node in web.Navigation.QuickLaunch)
        {
            Console.Write(new String('-', depth));
            Console.WriteLine(node.Title + " ("+node.Url+")");
            RecurseNavigation(root.OpenWeb(node.Url));
        }
        depth--;
    }

© Stack Overflow or respective owner

Related posts about sharepoint

Related posts about navigation