SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So there are a gazillion of different SiteMap providers in SharePoint:

  • SPNavigationProvider
  • SPSiteMapProvider
  • SPContentMapProvider
  • SPXmlContentMapProvider
  • SPXmlAdminContentMapProvider
  • CombinedNavSiteMapProvider
  • CurrentNavSiteMapProvider

To name a few. I found some tutorials on how to create my own SiteMap - all of them describe how I would in the end create an XML file with the SiteMapNodes with fixed URLs. When someone renames a page, my SiteMap will not be updated, hence broken!?

How is SharePoint updating its navigation menus (SiteMaps)? Is there a secret timer job running? Is this ASP.NET standard? How would I implement my own self-updating sitemap?

share|improve this question
up vote 1 down vote accepted

Sharepoint maintains its sitemap in database and not in xml.The database is updated as soon as you create new list or page.

If you want to create a self updating XML sitemap for specific items like pages or sites, you can do it with custom event receivers. For updating xml when:

  1. New pages are added\deleted : Write SPItemEventReceiver
  2. New Lists are added\deleted :Write SPListEventReceiver
  3. New webs are added\deleted: Write SPWebEventReceiver

If you want to update xml for everything, Write a timer job to read from PortalSiteMapProvider. You can programmatically enumerate the sitemapnodes in any of the PortalSiteMapProvider implementations you listed above and write it to xml sitemap file.

share|improve this answer
Nice reply! I thought there was an easier way as I thought about implementing tons of event receivers. – Dennis G Oct 11 '11 at 13:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.