Tuesday, March 13, 2012

SiteMapPath *Resolved*

I have one site set up, but there are different sections too it. My main section has a SiteMapPath that displays the breadcrumb based on my web.sitemap file, but how do I insert another SiteMapPath for the other section that doesn't contain the links for the main section.

So in essence I need two seperate web.sitemap files, is this possible?I figured it out, you can have multiple sitemap files by specifying them in the web.config like so:

<siteMap>
<providers>
<add
name="RmmisXmlSiteMapProvider"
type="System.Web.XmlSiteMapProvider"
siteMapFile="rmmis.sitemap" />
<add
name="DashboardXmlSiteMapProvider"
type="System.Web.XmlSiteMapProvider"
siteMapFile="dashboard.sitemap" />
</providers>
</siteMap>
I haven't been working with sitemaps much in ASP.NET, we've used our own algorithm to generate it in a very optimized fashion (you know how it is with corporations). But is a single provider all that's required for the entire website? Does this get generated from the VS.NET solution itself, and can any files be excluded?

0 comments:

Post a Comment