Extending SharePoint Breadcrumbs across multiple site collections

怎甘沉沦 提交于 2019-12-08 14:22:47

Since you are implementing a custom masterpage (or customizing the default one), why not replace the breadcrumb control with your own? Or make a custom sitemap provider if you need to combine your sitemap with Sharepoint's generated map.

I've thought a lot about why you can't use SPXmlContentMapProvider and I think it comes down to how SharePoint renders and uses managed paths. My theory is this:

All of the site collection locations in SharePoint are managed paths. Since the content is really stored in the database, and while IIS presents the information like it's in a folder, the pages aren't located in folders. Instead the location is somewhere in the "ether" of SharePoint and whatever location SPXmlContentMapProvider see's itself being in, it's somewhere else then the entries in the xml file. Now the Request.Url does know where you are, but that information does not appear to being presented to the SPXmlContentMapProvider.

I have also come up with a work around for the problem. You could manually edit the master page for each site collection to stick the breadcrumb trail for that site collection in front of the GlobalNavigationSiteMap. Thus, each site collection with this navigational requirement would then need to have it's own custom master page. It's an ugly, brute force way of doing things that I have no intention of implementing. It would work, but would be a maintenance nightmare.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!