Welcome to Office & SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

location of QuickLaunch contents/attributes

Last post 06-04-2007, 8:02 PM by jherschel7. 1 replies.
Sort Posts: Previous Next
  •  06-04-2007, 8:02 PM 28407

    location of QuickLaunch contents/attributes

    I would like the QuickLaunch to be collapsible/expandable.  Unfortunately, this cannot be done (tried to modify to treeview per ms website, but no luck).  

    When a person selects, SITE SETTINGS-> MODIFY SITE SETTINGS->NAVIGATION, he/she can customize the QuickLaunch and move links up/down, add, delete, hide, etc..

    Where is this 'setting' stored?  In the SQL database?

    I would like to create a web part that grabs this info and creates a quicklaunch that is expandable / collapsible

    Example
    [+] Documents
       - Shared Docs
       - Doc lib 2
    [-] Lists
    [-] Discussions
    [+] Sites
      - Site 1
      - Area 51
      - Site 3
    [-] People and Groups

    Thanks,
    Jon Herschel
  •  06-06-2007, 7:32 AM 28408 in reply to 28407

    location of QuickLaunch contents/attributes

    I figured it out (thanks to a friend of a friend, Ben) and in case some of you would benefit, here it its...

    SPSite site = SPControl.GetContextSite(Context);

    SPWeb web = site.OpenWeb();

    SPNavigationNodeCollection nodes = web.Navigation.QuickLaunch;

    foreach (SPNavigationNode node in nodes)

    {

    // Get Children if any

    SPNavigationNodeCollection Children = node.Children;

    if (Children.Count != 0)

    {

    if (node.IsVisible == true) // only display if visible & isExternal is set to true

    {

    writer.Write("<a href='" + node.url + "'>" + node.title + "<a/><br />");

    foreach (SPNavigationNode child in Children)

    {

    if (child.IsVisible == true) // only display if set to true

    {

    writer.Write("<a href=\"" + child.Url + "\">" + child.Title + "</a><br />");

    }

    }

    }

    }

    }

     

    Regards,

    Jonathan Herschel

    Anexinet

View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management and deployment capabilities with this free SharePoint CD. You’ve Deployed SharePoint…Now What?This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions Ease Your Scripting Pains with the Flexibility of PowerShell!Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer! Protecting Sharepoint with Double-Take for Windows 5.0Providing SharePoint recoverability is a two step process. Learn those steps now. Vendor protection solutions for SharePoint are incomplete at worst and unreliable at best. So what’s an Administrator to do? Read More… Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.