Using Multiple MvcSiteMaps

前端 未结 4 1355
有刺的猬
有刺的猬 2020-12-20 15:55

I\'ve recently hit a road block trying to use the MvcSiteMapProvider.

In my application, I have three distinct areas: Landing, Application and Administration. I curr

4条回答
  •  爱一瞬间的悲伤
    2020-12-20 16:14

    Multiple Sitemaps in One Application explains how this is done in v4, which has changed quite a bit from the accepted answer - which was for v3 and prior.

    The primary difference is that now multiple sitemaps are configured with DI, and you need to implement ISiteMapCacheKeyGenerator and/or ISiteMapCacheKeyToBuilderSetMapper, which are small classes to tell MvcSiteMapProvider how to map the incoming HTTP requests to each sitemap.

提交回复
热议问题