This post is part 2 from the Quick Launch series,
part-1 : customizing quick launch to pick up 3 or more level of sub-menu items
Part-2 : How to add 3 or more level of menu items in SharePoint quick launch
Part-3 : How to show/hide SharePoint Quick Launch for users with specific permission
In this post, I will discuss about how to add menu items to quick launch programmatically.
There isn’t any out of box settings that will allow you to add items to quick launch at 3rd or more levels. And so going with code solution again.
Here I am adding all views for task list at 3rd level Menu items under Tasks.
You can also get quick launch from web.Navigation.GlobalNodes and customize as per what you want.
MSDN links for Quick Launch:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.navigation.spnavigationnode.aspx
http://msdn.microsoft.com/en-us/library/ms466994.aspx
Hope that helps..!!
Hi,
This is great information. Could you tell me where you’re adding this code? In the masterpage? somewhere else?
As many details as can be provided are appreciated!
Thank you!
Cody
Hi Cody,
Thanks for the comment.
You can include the code in featureActivated event; make sure that you don’t re-populate the same sub-menu items !!
Regards
Aanu
I’m still not quite sure where to implement this. I changed the v4 master file successfully, I’m just not sure where to implement this code and how to move the items to the third level. Can you explain please?
Hi,Thanks for your post.I wrote the similar code in a Console App and running it on the Sharepoint Server 2010 isntalled machine.It is identifying the site and code is runing perfectly.But,when I see the site in the browser the same is not updated.I have another question too.Does this code change the Menu permanently or everytime do I need to run this whenever I want to publish this?I am very new to Sharepoint.So,Please bear with me.
I have changed the V4 master file according to your notes and save it. but do not see any changes on sharepoint site. Do i need to change it somewhere else or how to implement this change? pls advise.