Project Description
Global Navigation for WSS 3/MOSS 2007 across site collections and across content databases and provisioning pop-up window on desired menu items by using simple attributes in sitemap file .

This is classis example of extending custom attributes in your sitemap file and tweak MOSSMenu base code attached in this project to read those attributes and render menu's accordingly.

If you have any questions or concerns, please feel free to contact me at for review and follow-up on your global MOSS Global Navigation requirements across your site collections across content databases.

This project is very helpfull for people who migrated SPS 2003 to MOSS 2007 with many content databases across site collections in your server farm.

Quick wrap up on Global Navigation what I have at this moment out of my memory bank. Stay tuned for full article and source code ...

1. The solution is around custom sample xml file called appbin/GlobalMenu.sitemap in front end web application(vdir in IIS 6.0). You need to include desired site menu structure for your enterprise. Make sure this file is bug free from XML parser by open file with internet browser.

Refer to attached sample file GlobalMenu.sitemap along with source code project

<siteMapNode title='Home' url='/'>
<siteMapNode title="Services" url="/Services/default.aspx" target="_new">
<siteMapNode title="Time and Expense" url="/Time and Expense/default.aspx" target="new" popupwidth="400" popupheight="600" popup="/Time and Expense/default.aspx"*/>
<siteMapNode title="Human Resouces" url="/Human Resouces/default.aspx"/>
<siteMapNode title="Research" url="/Research/default.aspx"/>
<siteMapNode title="Research" url="/Research/default.aspx">
<siteMapNode title="Global Research" url="/Research/Global/default.aspx" target="_new" />
<siteMapNode title="Local Research" url="/Research/Global/default.aspx"/>
<siteMapNode title="Public Sector" url="/Research/Public Sector/default.aspx"/>

2. Install MOSSMenu if you want to customise menu items to new popup window as target than default _top window

/// Source Blog:
/// Original Code Release Date: Saturday, December 02, 2006 5:37 PM
/// Note: MossMenu is provided as is and will only work on sites built with WSS 3.0 or MOSS 2007.
/// MossMenu relies on some JavaScript which has been included along with the C# source.
/// This is really just for completeness’ sake aside: some trival about the use of the apostrophe for
/// the possessive forms of nouns
as this script is automatically included on most pages through the
/// core.js script include reference.
/// Enhancement Author: Venkatesam Miriyapalli (Venky)
/// Date: 09-21-2008
/// This code has been enhanced to cater popup window for desired Global Navigation menu Items.
/// If you want out of the box open source code please go to below site

3. Provision Master page yourmaster.master or cross site collection master page feature ...

Refer to attached sample file yourcustom.master along with source code project

<StaticMenuItemStyle CssClass="ms-topnav" ItemSpacing="0px"/>
<StaticSelectedStyle CssClass="ms-topnavselected" />
<StaticHoverStyle CssClass="ms-topNavHover" />
<DynamicMenuStyle BackColor="#F2F3F4" BorderColor="#A7B4CE" BorderWidth="1px"/>
<DynamicMenuItemStyle CssClass="ms-topNavFlyOuts"/>
<DynamicHoverStyle CssClass="ms-topNavFlyOutsHover"/>
<DynamicSelectedStyle CssClass="ms-topNavFlyOutsSelected"/>


<!-- new XML site map -->
<SharePoint:DelegateControl runat="server" ControlId="XmlNavigationDataSource">
<asp:SiteMapDataSource id="xmlSiteMap" ShowStartingNode="true" SiteMapProvider="CustomXmlContentMapProvider" runat="server"/>

4. In web.config of Front-End application

Refer to attached sample file web.config along with source code project

<SafeControl Assembly="MossMenu, Version=, Culture=neutral, PublicKeyToken=672db77638371ca3" Namespace="Microsoft.SDK.SharePointServer.Samples" TypeName="*" Safe="True" AllowRemoteDesigner="True"/>

<siteMap defaultProvider="CurrentNavSiteMapProvider" enabled="true">
<add name="CustomXmlContentMapProvider" siteMapFile="appbin/GlobalMenu.sitemap" type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

5. Make sure you have Trust attribute during your development at first to make it work then you can change to code access security and tweak desired permission. I will update soon with those details in next update.

<!--<trust level="WSS_Custom" originUrl="" />-->
<trust level="Full" originUrl="" />


Regards and Thanks,
Good Luck for your MOSS migrations and custom navigation solution.

I am very thankfull to all the colleague(s), client(s) and Microsoft's open source MOSSMenu code who have supported to build this custom solution and supported to publish this article.

CodePlex Member since: June 12, 2006

Last edited Sep 22, 2008 at 12:28 AM by venkyweb, version 9