Click here to Skip to main content
12,749,770 members (37,940 online)
Click here to Skip to main content
Add your own
alternative version


8 bookmarked
Posted 11 Apr 2009

Customize QuickLanch Menu using Site Map Provider & Deloy it through Features

, 12 Apr 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
Customize QuickLanch Menu using Site Map Provider & Deloy it through Features


This article introduce a way to built customized QuickLaunch Menu using sitemap provider & deploy it though feature.


Share Point provides left navigation bar with conventional fly-out menu.Sometime the user may need to change the look and feel of left navigation menu item content.At the same time customized menu must be flexible enough to deploy it easily.

Using the code

Steps 1. Define a new Custom XML Provider under tag named “<providers>” in the web.config

<siteMap defaultProvider="CurrentNavSiteMapProvider" enabled="true">

      <!-- introduce a new xml provider to bind with quicklaunch menu -->
           <add name="CustomXmlContentMapProvider" siteMapFile="_app_bin/mainMenu.sitemap" 
               type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, 
Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

Steps 2. Create a new .sitemap file in “\_app_bin “folder of virtual directory (i.e topMenu.sitemap)

<?xml version="1.0" encoding="utf-8" ?> 
<siteMapNode title="At Work Resources" url="/"> 
<siteMapNode title="Booking Travel" url="http://moss2007/_layouts/viewlsts.aspx?BaseType=1"> 
<siteMapNode title="America" url=""/> 
<siteMapNode title="Asia/Australia" url=""/> 
<siteMapNode title="Europe" url=""/> 

<siteMapNode title="Branding" url="#"> 
<siteMapNode title="Brand" url=""/> 
<siteMapNode title="Branding Guidelines" url=""/> 
<siteMapNode title="Logos" url=""/> 
<siteMapNode title="Templates" url=""/> 

<siteMapNode title="Commonly Used Terms" url=""/> 

<siteMapNode title="Communities" url="#!"> 
<siteMapNode title="All Communities" url=""/> 
<siteMapNode title="Communities With Web Sites" url=""> 
<siteMapNode title="Women's Environment" url=""/> 
<siteMapNode title="BizTalk Server" url=""/> 
<siteMapNode title="Commerce Server" url=""/> 
<siteMapNode title="Delivery Management" url=""/> 
<siteMapNode title="Diversity and Inclusion" url=""/> 
<siteMapNode title="Project Workspace" url=""/> 

Step 3. Open your site master page and create a new <asp:Delegatecontrol /> just below the default Quick Launch Menu delegate control & bind this newly created delegate control to Quick Launch ASP Menu control

<SharePoint:DelegateControl runat="server" ControlId="XmlQLNavigationDataSource"> 
<asp:SiteMapDataSource id="xmlQLSiteMap" ShowStartingNode="true" 
    SiteMapProvider="SPNavigationProvider" runat="server" /> 

<SharePoint:AspMenu id="QuickLaunchMenu" DataSourceId="xmlQLSiteMap" 
    runat="server" Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true" 
    MaximumDynamicDisplayLevels="3" StaticSubMenuIndent="0" SkipLinkText=""> 

Step 4. Once you do appropriate changes in the master page, quick launch will show all the content from the .sitemap file.

Scroll up to view final outcome of your quick launch.

Step 5.Moss 2007 empowered with Feature which has capability of deploying user action using a piece of xml files. In the real world scenario user may ask to deploy customized quick launch by feature.

Let’s built a new feature to deploy sitemap bounded quick launch. Create a new folder under “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\” & create two xml file

1 feature.xml

2.<file name>.xml

feature.xml :

<?xml version="1.0" encoding="utf-8" ?> 
<Feature Id="541F5F57-C847-4e16-B59A-B31E90E6F9ED" Title="Customized Navigation" 
    Scope="Site" Hidden="False" DefaultResourceFile="core" 
    ReceiverAssembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" 
    xmlns="" > 
<ElementManifest Location="filename.xml" /> 


<!— Comments 
XmlQLNavigationDataSource: ID of newly created Delegate Control 
xmlQLSiteMap: ID of ASP Menu control 
CustomXmlContentMapProvider: custom xml provider defined in the web.config file 

<Elements xmlns=""> 
<Control Id="XmlQLNavigationDataSource" Sequence="25" 
ControlAssembly="System.Web, version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
<Property Name="SiteMapProvider">CustomXmlContentMapProvider</Property> 
<Property Name="ShowStartingNode">true</Property> 
<Property Name="ID">xmlQLSiteMap</Property> 
<HideCustomAction Id="QuickLaunch" HideActionId="QuickLaunch" GroupId="Customization" 
    Location="Microsoft.SharePoint.SiteSettings" /> 

Step 6. Once you built these two xml files under the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\<Your Folder Name>, use stsadm command to install feature & at last restart your IIS to reflect the changes in your site.

Points of Interest

While figuring out this solution, I felt Microsoft SharePoint team is always trying to make their products better to meet end user requirements, and I believe we will be able to see Microsoft's implementation on this issue in the next version.


I will keep updating as I dig into the SharePoint world. In fact, there are lots of issues like this. I think Microsoft may make WSS 3.0 much better if they get more time before publishing the next version.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

You may also be interested in...


Comments and Discussions

GeneralUnexpected Error Pin
dwarf8812-Jul-10 19:04
memberdwarf8812-Jul-10 19:04 
GeneralSelected item Pin
metalsandman24-Nov-09 2:28
membermetalsandman24-Nov-09 2:28 
GeneralIDs are wrong Pin
Member 203893213-Nov-09 1:25
memberMember 203893213-Nov-09 1:25 
GeneralThis feature didn't work for me. Pin
jain_nitin3-Sep-09 21:42
memberjain_nitin3-Sep-09 21:42 
GeneralRe: This feature didn't work for me. Pin
amish_khatri@mail.com11-Nov-09 18:41
memberamish_khatri@mail.com11-Nov-09 18:41 
GeneralRe: This feature didn't work for me. Pin
amish_khatri@mail.com11-Nov-09 18:41
memberamish_khatri@mail.com11-Nov-09 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170215.1 | Last Updated 12 Apr 2009
Article Copyright 2009 by
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid