Changing the Starting node of the BreadCrumb, as well as for the SiteMapPath turned out to be more tricky than I thought. This is due to the fact that the two controls are almost the same and they are not able to work with SiteMapDataSource. We can only set a starting node on SiteMapDataSource unfortunately.
What we can do is "Hack the SiteMapPath"
so it can use SiteMapDataSource. This is one approach to the problem, another one could be to build your own breadcrumb control. So here is what you could do:
1. Create a Custom User Control, and drop a SiteMapDataSource
control. You can find it in the Visual Studio control toolbox.
2. In the code behind and Page_Load event:
|string resolvedUrl = Telerik.Web.UrlPath.ResolveUrl("~/resultUrl.aspx");
|SiteMapNode currentNode = SiteMap.Provider.FindSiteMapNode(resolvedUrl);
|SiteMapDataSource1.StartingNodeUrl = currentNode;
You have the node of the resultUrl, where resultUrl.aspx is an URL of the current result. From now on, you could iterate through all currentNode.parentNode
-s, until you reach the root node and this is your path. For every Node you are adding a link and between the links, you have the separator character.
the Telerik team