locked
Sitemap with Application Relative urls RRS feed

  • Question

  • I am trying to build a sitemap with application relative urls. SharePoint seems to ignore the application relative nature of the urls and simply appends them to the current site url. I am using the SPXmlContentMapProvider to provide an xml based global navigation element for my SharePoint deployment.

    For example, I have the following node in my sitemap:

    <siteMapNode title="Human Resources" url="~/dept/hr" >

    The url above appends to whatever the current level site url is. Does SharePoint not understand application-relative urls?

    Wednesday, June 2, 2010 3:13 PM

Answers

  • You need to change the type in your provider line in web.config to

    System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 

    • Marked as answer by Chris Grist Saturday, June 16, 2012 10:17 AM
    Thursday, August 18, 2011 4:50 PM

All replies

  • SharePoint doesnt recognise the ~ that asp uses try with /dept/hr 
    Wednesday, June 9, 2010 8:21 PM
  • Did you ever get this resolved.  I am having the same issue even without the ~.
    Sunday, January 2, 2011 3:52 PM
  • You need to change the type in your provider line in web.config to

    System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 

    • Marked as answer by Chris Grist Saturday, June 16, 2012 10:17 AM
    Thursday, August 18, 2011 4:50 PM