How To Customize QuickLaunchMenu

Friday, April 13, 2007, 17:35
This news item was posted in Site News, UI, User Interface and Navigation category and has 3 Comments so far.

SharePoint 2007 Quick Launch Menu default on a fresh installThe ever popular quick launch menu has some great functionality that SharePoint 2007 offers since it uses AspMenu Members (Microsoft.SharePoint.WebControls). This how to guide will provide you with as much information as possible so that its worthy for you to keep visiting time and time again. The default quick launch menu look is on the left.

For the beginning SharePoint Administrator / Developer, little do they know that they have quite a bit of flexibility in customizing the look and feel besides just the CSS properties. Lets take you through on making simple changes to the QuickLaunchMenu in SharePoint 2007 and point you to resources that will do whatever you wish with the left bar navigation look and feel.

Launching the Master Theme in SharePoint Designer 2007

  1. Launch the site in your browser
  2. Browse over to the site settings page by clicking on the following:
    Site Actions menu -> Site settings -> SharePoint 2007 - Modify All Site Settings Modify All Site Settings
  3. In the Site settings page, under the Galleries section, click on Master pages and page layouts
  4. You are now at the Master Page Gallery. Click on the drop down menu for default.master and select Edit in Microsoft Office SharePoint Designer
    drop down menu for default.master and select Edit in Microsoft Office SharePoint Designer
  5. SharePoint Designer will launch the default.master file and provide you with the site design and code.
  6. Switch to code view by clicking on View menu -> Page -> Code

Find QuickLaunchMenu Within Default.Master Page

In SharePoint Designer’s code view, there are two instances of SharePoint:AspMenu control. One will be the top navigation and second will be the Quick Launch menu.

  1. Hit Ctrl+F on your keyword and search for SharePoint:AspMenu
  2. You will find it in the third instance of the term SharePoint:AspMen, as the first two terms are related to the top navigation
  3. This is what the SharePoint:AspMenu QuickLaunch menu code looks like on a default Publishing Collaboration Portal web site:

    <sharepoint:aspmenu
    id=”QuickLaunchMenu”
    DataSourceId=”QuickLaunchSiteMap”
    runat=”server”
    Orientation=”Vertical”
    StaticDisplayLevels=”1″
    ItemWrap=”true”
    MaximumDynamicDisplayLevels=”1″
    StaticSubMenuIndent=”0″
    SkipLinkText=”">

Default QuickLaunchMenu Properties

Orientation - specify the direction in which to render the Menu control. Your options are Vertical or Horizontal. The default value is Vertical.

StaticDisplayLevels - specify the number of menu levels to display in a static menu. All menu levels below the specified value are displayed in a dynamic menu. The default value is 1. You can display multiple menu levels in the static menu by setting the StaticDisplayLevels property to a value greater than 1.

ItemWrap - when the text runs out of space, it is automatically split and continued on the following line. The default value is true.

MaximumDynamicDisplayLevels - you can also display additional levels in dynamic menus by setting this property to a value greater than 0. You can also display additional levels in dynamic menus by setting this property to a value greater than 0. Setting this property to 0 displays a flat menu up to the level specified by the StaticDisplayLevels property, without any dynamic menus.

StaticSubMenuIndent - specify the number of pixels by which to indent the submenu items within the static menu.

Other QuickLaunchMenu Properties

AccessKey - use the AccessKey property to specify the keyboard shortcut for the Web server control. This allows you to navigate quickly to the control by pressing the ALT key and the key for the specified character on the keyboard. For example, setting the access key of a control to the string “D” indicates that the user can navigate to the control by pressing ALT+D.

ToolTip - use the ToolTip property to specify the custom text that is displayed when the mouse pointer hovers over the Web server control.

Width - use the Width property to specify the width of the Web server control.

Example Usage

For example, if I wanted to have to display a collapsed view with fly-out menus for the following QuickLaunchMenu:
SharePoint 2007 Quick Launch Menu default

You will need to make changes to the StaticDisplayLevels and MaximumDynamicDisplayLevels property.

  1. Set the StaticDisplayLevels propery value of the Menu control to 1
  2. Set the MaximumDynamicDisplayLevels property value of the Menu control to 1

The end result will be:

SharePoint 2007 Quick Launch Menu collapsed view with fly-out menus

Additional Resources:

Related Posts:

  • The Best of SharePoint Buzz: April 2007 Edition
  • I learned a valuable lesson during April: there's a difference between finding the buzz that others are creating and creating your own. As much
  • Back into the Sharing Mode
  • The last month I have been extremely busy: work, contracts, community projects and just enjoying the summer. I have quit my full time
  • Top Customization Tips for CRM
  • There's quite a bit of information that you can get on customizing Dynamics CRM. Even if you are familiar with the basic features
  • Have Questions About Unghosting / Customize? Joel Has the Answer
  • Joel has written an amazing post with tons of information titled To Unghost or To Not Unghost, That Is the Question! In his post he talks
  • Unattended SharePoint 2007 Installation
  • Joel Oleson hits us with another great post on one of my favorite subjects: Unattended Installations.  In particular, the post is a focus on how
    Both comments and pings are currently closed.

    3 Responses to “How To Customize QuickLaunchMenu”

    1. MikeC said on Monday, April 23, 2007, 20:29

      This is great info — thanks! Can you point me toward how I might include the Quick Launch on additional pages? I’d like to have this appear consistently throughout my site, but I can’t seem to find a way to add it to a webpart page, and would prefer to not resort to a 3rd party add-in…

      Again, thanks!

    2. shaileshraj2005 said on Thursday, February 14, 2008, 6:34

      Hi Kanwal Khipple
      I am facing a problem related to Sharepoint Administration.
      Actually I am doint Sharepoint Integration with Sql Server Reporting Services and I am blocked on one point. Every thing is working wel but when I click “Set server defaults” I Get an Error like “Connection focebly disconnected…”

      Please help me. I am tired.