Best way to programmatically create/maintain SharePoint Quick Launch menu -


we have solution deploys number of lists , pages. wan't create links them on quick launch menu automatically when feature activated.

the structure this.

  • customers
    • active
    • inactive
  • sales
    • quotes
    • orders

and on. site collection admin might add link between "active" , "inactive" links. when feature deactivated don't want remove items, if feature activated again don't want navigation added again :)

is there built in api can use? know spweb.navigation.quicklaunch , spnavigationnode(collection) structure etc. there way?

hope can :)

what kind of other way looking for?

    public override void featureactivated(spfeaturereceiverproperties properties)     {         spweb web = (spweb)properties.feature.parent;       // check existing link list.         spnavigationnode listnode = web.navigation.getnodebyurl(list.defaultviewurl);       // no link, create one.         if (listnode == null)         {                    // create node.               listnode = new spnavigationnode(list.title, list.defaultviewurl);               // add quick launch.               web.navigation.addtoquicklaunch(listnode, spquicklaunchheading.lists);         }     } 

we have used method above while , tends work out fine.

if can let me know kind of thing trying accomplish manipulating spweb.navigation wont let do, might able of more help


Comments

Popular posts from this blog

c# - IMAP GMAIL getting folder list problem -

CUDA shared memory -