Sign In
  • home
  • solutions
  • services
  • success stories
  • news
  • careers
  • partners
  • blogs
  • contact
 
Go Search
Categories
SharePoint
Administration
Development
Tips
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
Other Blogs
There are no items in this list.
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
Links
Archive
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
livePoint Blogs > Posts > Creating a custom site map for your SharePoint navigation

16/11/2008

Creating a custom site map for your SharePoint navigation
Have you ever wanted to show a consistent navigation for all Site collections for governance and branding reasons but SharePoint out of the box does not let you?. Then you need to learn about custom site maps which use the navigation providers feature in SharePoint 2007.
 

Here is a quick set of instructions:

1. Create a custom site map file

This is the XML file that tells SharePoint what to show in the menus. You can have as many levels as you want in here. For example:

<siteMap>

<siteMapNode title="Home" url="/" >

    <siteMapNode title="Departments" url="/Departments">

        <siteMapNode title="Corporate Services" url="~/dept/CorporateServices"/>

        <siteMapNode title="Finance" url="~/dept/Finance"/>

        <siteMapNode title="Engineering" url="/dept/Engineering"/>

        <siteMapNode title="Business Development" url="/dept/BD"/>

    </siteMapNode>

    <siteMapNode title="Services" url="~/Services">

        <siteMapNode title="Human Resources" url="/sites/HR"/>

        <siteMapNode title="IT" url="/sites/IT"/>

   </siteMapNode>

  <siteMapNode title="Resources" url="~/Resources">

     <siteMapNode title="Training" url="/Training"/>

     <siteMapNode title="Forms" url="/Docs/Forms/"/>

  </siteMapNode>

</siteMapNode>

</siteMap>

 

Then save this file to a location accessible by SharePoint, for example in

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\mycustom.sitemap

this will map to _layouts/mycustom.sitemap through the browser.

2. Add a Site Map Provider to web.config

Go to the web application's web.config file and do the following:

a. Find the "<siteMap" string. In here you will see a number of sitemap providers.

b. add a new line for your custom site map provider

<add name="MyCustomSiteMapProvider" siteMapFile="_layouts/mycustom.sitemap" type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

3. Add a SiteMapDataSource to your master page

a. Open SharePoint Designer (SPD) and open the master page for your site

b. Look for the line <SharePoint:AspMenu and add the following right above it:

<asp:SiteMapDataSource ShowStartingNode="True" runat="server"
       ID="MyCustomSiteMap" SiteMapProvider="MyCustomSiteMapProvider" />

4. Modify the SharePoint menu source

a. Still in SPD, look for the <SharePoint:AspMenu node and modify the following properties

DataSourceID="MyCustomSiteMap"

b. If you also want to show more levels then play with the numbers in the nodes for MaximumDynamicDisplayLevels=2 or 3, depending on how many levels you want to show.

c. Save your master page

When you go back to your site and refresh the page, you should see the new menus.

What Next

From here, you can :

1. Ensure that the master page is replicated to each site collection so that you get a consistent navigation as your governance and branding policy mandates.

2. Update the site templates with the new master page so that new site or site collections  created from these templates have the new design.

 

Posted at 6:18 PM by Sergio Otoya | Permalink | Email this Post | Comments (136)
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256

Comments

runtime error

When I go to my website after doing this custom site menu I get a "Server Error in '/' Application. Any ideas why?
at 20/02/2009 2:33 AM

Re: Creating a custom site map for your SharePoint navigation

Thanks for the comments.
I have seen other errors but not this Server error in / application.

What I usually do with this is do 1 change at a time. For example:

1. Create the custom site map and add it to the _layouts directory. then go back to the site.
2. Make a change to the web.config sitemap section save it. then go back to the site. (I usually get an error message if I am not careful with closing brackets,etc).

3. Add the sitemapdatasource tag to the master page. Ensure that the name in the web.cofig tag maches the DataSourceID. This is case sensitive i believe. Save and test.

4. modify the Aspmenu tag.
In here you MUST make sure that both IDs match (that is, DataSourceID and the ID tag of the SiteMapDataSource). Save and Test.

If you are still getting errors I would look at the sharepoint logs for more information but this process works for me every time (with a careful eye).

Also, 1 other thing that I noticed with the custom site map file is that you cannot have duplicate Urls in there. So, start with a simple sitemap with 1 level and then add more nodes incrementally.

I hope this helps.
Sergio Otoya at 20/02/2009 7:20 AM

Security Trimming

Hi Sergio, thanks for the post

can we security trim the site map that we create usign this process.

Thanks much..
at 25/09/2009 3:28 AM

Re: Creating a custom site map for your SharePoint navigation

I think this is one of the downsides of this method as sharepoint does not know about the nodes that you are showing here.
Sergio Otoya at 25/09/2009 10:59 AM

Add Comment

Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


CommentUrl


Attachments

Copyright © 2007 livePoint

         Copyright  |  Privacy
         Terms of Use

home | solutions | services | sucess stories | news | blogs | careers | partners | contact