Adding A List To The Quick Launch Menu Using Code

I thought I better write down instructions on how to add a List object to the Quick Launch Menu (or as I used to refer to it, the left navigation menu) through code. Its pretty basic, all you need to do is set the “OnQuickLaunch” boolean property to true if you want it in the menu and to false if you don’t want it in the menu. Pretty simple, just too bad WSS 3.0 is pretty badly documented meaning it can be a bit of a pain trying to find out something so simple. In case people really need code, I’ve included a small snippet of a property below.

SPList _list;
public bool ShowQuickLaunchLink
{
 get
 {
  return _list.OnQuickLaunch;
 }
 set
 {
  _list.OnQuickLaunch = value;
  _list.Update();
 }
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s